Removed trailing \n from error_msg{,_and_die} messages.
diff --git a/util-linux/nfsmount.c b/util-linux/nfsmount.c
index b260a88..397858b 100644
--- a/util-linux/nfsmount.c
+++ b/util-linux/nfsmount.c
@@ -307,7 +307,7 @@
msock = fsock = -1;
mclient = NULL;
if (strlen(spec) >= sizeof(hostdir)) {
- error_msg("excessively long host:dir argument\n");
+ error_msg("excessively long host:dir argument");
goto fail;
}
strcpy(hostdir, spec);
@@ -319,10 +319,10 @@
until they can be fully supported. (mack@sgi.com) */
if ((s = strchr(hostdir, ','))) {
*s = '\0';
- error_msg("warning: multiple hostnames not supported\n");
+ error_msg("warning: multiple hostnames not supported");
}
} else {
- error_msg("directory to mount not in host:dir format\n");
+ error_msg("directory to mount not in host:dir format");
goto fail;
}
@@ -332,11 +332,11 @@
#endif
{
if ((hp = gethostbyname(hostname)) == NULL) {
- error_msg("can't get address for %s\n", hostname);
+ error_msg("can't get address for %s", hostname);
goto fail;
} else {
if (hp->h_length > sizeof(struct in_addr)) {
- error_msg("got bad hp->h_length\n");
+ error_msg("got bad hp->h_length");
hp->h_length = sizeof(struct in_addr);
}
memcpy(&server_addr.sin_addr,
@@ -353,7 +353,7 @@
if (!old_opts)
old_opts = "";
if (strlen(old_opts) + strlen(s) + 10 >= sizeof(new_opts)) {
- error_msg("excessively long option argument\n");
+ error_msg("excessively long option argument");
goto fail;
}
sprintf(new_opts, "%s%saddr=%s",
@@ -513,11 +513,11 @@
data.flags |= (nolock ? NFS_MOUNT_NONLM : 0);
#endif
if (nfsvers > MAX_NFSPROT) {
- error_msg("NFSv%d not supported!\n", nfsvers);
+ error_msg("NFSv%d not supported!", nfsvers);
return 0;
}
if (mountvers > MAX_NFSPROT) {
- error_msg("NFSv%d not supported!\n", nfsvers);
+ error_msg("NFSv%d not supported!", nfsvers);
return 0;
}
if (nfsvers && !mountvers)
@@ -577,11 +577,11 @@
mount_server_addr.sin_addr.s_addr = inet_addr(hostname);
} else {
if ((hp = gethostbyname(mounthost)) == NULL) {
- error_msg("can't get address for %s\n", hostname);
+ error_msg("can't get address for %s", hostname);
goto fail;
} else {
if (hp->h_length > sizeof(struct in_addr)) {
- error_msg("got bad hp->h_length?\n");
+ error_msg("got bad hp->h_length?");
hp->h_length = sizeof(struct in_addr);
}
mount_server_addr.sin_family = AF_INET;
@@ -716,7 +716,7 @@
if (nfsvers == 2) {
if (status.nfsv2.fhs_status != 0) {
- error_msg("%s:%s failed, reason given by server: %s\n",
+ error_msg("%s:%s failed, reason given by server: %s",
hostname, dirname,
nfs_strerror(status.nfsv2.fhs_status));
goto fail;
@@ -734,7 +734,7 @@
#if NFS_MOUNT_VERSION >= 4
fhandle3 *fhandle;
if (status.nfsv3.fhs_status != 0) {
- error_msg("%s:%s failed, reason given by server: %s\n",
+ error_msg("%s:%s failed, reason given by server: %s",
hostname, dirname,
nfs_strerror(status.nfsv3.fhs_status));
goto fail;