diff mbox series

cifs-utils: fix error messages missing newline

Message ID CAG-2b+3KYcFuHtRx3LQ8d+_VK_zMvwzPVkQwqfapjDKmfuUZ8Q@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series cifs-utils: fix error messages missing newline | expand

Commit Message

zry98 May 15, 2024, 1:28 p.m. UTC
Add missing newline characters to two error messages. This commit
fixes an issue where some error messages were not properly terminated
with newline characters in mount.cifs (e.g., `mount error(111): could
not connect to 192.168.1.2Unable to find suitable address.`), it
improves the readability of stderr outputs.

Signed-off-by: zry98 <dev@zry.io>
---
 mount.cifs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

        }
@@ -2267,7 +2267,7 @@ mount_retry:
                case ECONNREFUSED:
                case EHOSTUNREACH:
                        if (currentaddress) {
-                               fprintf(stderr, "mount error(%d):
could not connect to %s",
+                               fprintf(stderr, "mount error(%d):
could not connect to %s\n",
                                        errno, currentaddress);
                        }
                        currentaddress = nextaddress;
--
2.44.0
diff mbox series

Patch

diff --git a/mount.cifs.c b/mount.cifs.c
index 2278995..6e49811 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1517,7 +1517,7 @@  add_mtab(char *devname, char *mountpoint,
unsigned long flags, const char *fstyp
        atexit(unlock_mtab);
        rc = lock_mtab();
        if (rc) {
-               fprintf(stderr, "cannot lock mtab");
+               fprintf(stderr, "cannot lock mtab\n");
                rc = EX_FILEIO;
                goto add_mtab_exit;