Linux-CIFS Archive mirror
 help / color / mirror / Atom feed
From: zry98 <dev@zry.io>
To: linux-cifs@vger.kernel.org
Subject: [PATCH] cifs-utils: fix error messages missing newline
Date: Wed, 15 May 2024 15:28:26 +0200	[thread overview]
Message-ID: <CAG-2b+3KYcFuHtRx3LQ8d+_VK_zMvwzPVkQwqfapjDKmfuUZ8Q@mail.gmail.com> (raw)

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(-)

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;
        }
@@ -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

                 reply	other threads:[~2024-05-15 13:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG-2b+3KYcFuHtRx3LQ8d+_VK_zMvwzPVkQwqfapjDKmfuUZ8Q@mail.gmail.com \
    --to=dev@zry.io \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).