Re: [PATCH] rev: use warn() in errs.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 10, 2007 at 02:45:37PM +0800, Li Zefan wrote:
> The function warn() in rev.c is actually duplicate code, 
> so here we remove it.
> 
> Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>


On Tue, Sep 11, 2007 at 01:48:38PM +0800, Li Zefan wrote:
> -	fprintf(stderr, _("Cannot open \"%s\" for read\n"), filename);
> -	perror("");
> -	exit(1);
> +	err(EXIT_FAILURE, "Cannot open %s for read", filename);

 You forgot _() and initialize the global __progname variable. See
 errs.h and for example cal.c or column.c.


 Well, the best way how fix the errs.h junk is delete it and use
 err.h from glibc everywhere in util-linux. For more details:

 http://www.gnu.org/software/libc/manual/html_node/Error-Messages.html

        Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux