Re: [PATCH] ldattach(8)

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

 



On Tuesday 05 February 2008, Karel Zak wrote:
> On Tue, Feb 05, 2008 at 07:57:08PM -0500, Mike Frysinger wrote:
> > On Tuesday 05 February 2008, Karel Zak wrote:
> > > On Tue, Feb 05, 2008 at 06:49:41PM -0500, Mike Frysinger wrote:
> > > > On Tuesday 05 February 2008, Tilman Schmidt wrote:
> > > > > +	    fprintf(stderr, "%s: bad line discipline: %s\n", prog,
> > > > > optarg); +	    exit(EXIT_FAILURE);
> > > > > ...
> > > > > +	fprintf(stderr, "%s: cannot open %s: %s\n", prog, dev,
> > > > > strerror(errno)); +	exit(EXIT_FAILURE);
> > > > > ...
> > > > > +	fprintf(stderr, "%s: %s is not a serial line\n", prog, dev);
> > > > > +	exit(EXIT_FAILURE);
> > > > > ...
> > > > > +	fprintf(stderr, "%s: cannot set %s to exclusive mode: %s\n",
> > > > > +		prog, dev, strerror(errno));
> > > > > +	exit(EXIT_FAILURE);
> > > > > ...
> > > > > +	fprintf(stderr, "%s: cannot get terminal attributes for %s:
> > > > > %s\n", +		prog, dev, strerror(errno));
> > > > > +	exit(EXIT_FAILURE);
> > > > > ...
> > > > > <many more>
> > > >
> > > > could do with writing an error function and/or macro to make things
> > > > cleaner
> > >
> > >  #include <err.h> ... err()  -- very luxury function:
> > >
> > >     err("cannot get terminal attributes for %s", dev);
> > >
> > >  that's all...
> >
> > hrm, that's a GNU-extension not in POSIX ... but if there's no other
> > attractive alternatives, that's fine.  i bet gnulib has a local version
> > for people to fall back on if the system libc does not provide it ...
>
>  I think we have already talked about supported libc versions. The
>  list is very short -- glibc and uClibc

sure ... dont take my comment to mean "oh no dont use it" ... just making 
note.  anyone who *really* cares can address it themselves.

>  (someone also suggested klibc 
>  and dietlibc but I don't think it's real wish for now).

cant really comment on either those as being viable as i havent seen them in 
real use.  but perhaps i'm in a secluded area of open source.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[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