Hello again, let me make an important comment on one small patch I suggested to "ifconfig/printif.c (put_flags).
On GNU/kfreebsd, FreeBSD, OpenBSD, and probably NetBSD, the interface flag #define IFF_MULTICAST 0x8000 causes the old code, which uses short int f to print a negative value for any physical ethernet adapter. A simple change of this to unsigned short int f and a corresponding hexadecimal format string will recover the presentation used in the native forms of "ifconfig" for the mentioned operating systems. For GNU/Linux the corresponding value #define IFF_DYNAMIC seems to be rarely used. Right? Mats E A torsdag den 16 september 2010 klockan 01:38 skrev Mats Erik Andersson detta: > Hello, > > more corrections and adaptions to OpenBSD. A set of three patches: > > 0001-ifconfig-... : Augmentation to formatted printing. > > > diff --git a/ChangeLog b/ChangeLog > index 5cb717b..6a35bfc 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,11 @@ > +2010-09-16 Mats Erik Andersson <g...@gisladisker.se> > + > + * ifconfig/flags.c (flag_char_tab): Include IFF_SIMPLEX. > + * ifconfig/printif.c (put_int): Correct the position of "#" modifier. > + (put_int): Implement modifier "h" for short integers, etcetera. > + (put_flags): Declare "unsigned short" to correctly interpret flags. > + * ifconfig/options.c (formats/unix): Correct some format strings. > put_flags (format_data_t form, int argc, char *argv[], short flags) > { > /* XXX */ > - short int f = 1; > + unsigned short int f = 1; > const char *name; > int first = 1; >