[hackers] [ubase] Use weprintf() instead of fprintf() for mount(8) || sin

From: <git_AT_suckless.org>
Date: Sat, 15 Mar 2014 15:02:06 +0100

commit 6c926cd1d4389657135159b7070fad292c64e790
Author: sin <sin_AT_2f30.org>
Date: Sat Mar 15 14:01:17 2014 +0000

    Use weprintf() instead of fprintf() for mount(8)

diff --git a/mount.c b/mount.c
index afcfee4..d01eecd 100644
--- a/mount.c
+++ b/mount.c
_AT_@ -1,5 +1,4 @@
 /* See LICENSE file for copyright and license details. */
-#include <errno.h>
 #include <mntent.h>
 #include <stdio.h>
 #include <stdlib.h>
_AT_@ -145,7 +144,7 @@ main(int argc, char *argv[])
                         endmntent(fp);
                         fp = NULL;
                 } else {
- fprintf(stderr, "setmntent %s: %s
", files[i], strerror(errno));
+ weprintf("setmntent %s:", files[i]);
                 }
         }
         if(!source)
_AT_@ -165,7 +164,7 @@ mountall:
                 flags = 0;
                 parseopts(me->mnt_opts, &flags, data, datasiz);
                 if(mount(me->mnt_fsname, me->mnt_dir, me->mnt_type, flags, data) < 0)
- fprintf(stderr, "mount: %s
", strerror(errno));
+ weprintf("mount:");
         }
         endmntent(fp);
 
Received on Sat Mar 15 2014 - 15:02:06 CET

This archive was generated by hypermail 2.3.0 : Sat Mar 15 2014 - 15:12:12 CET