[Pkg-pciutils-discuss] Re: [PATCH] Restore lspci -m formatting on
machines with domains
mj at ucw.cz
Tue Apr 11 14:30:12 UTC 2006
> > + if (!machine_readable ? show_domains : (p->domain || show_domains >= 2))
> > printf("%04x:", p->domain);
> Actually, that can be simplified to:
> if (p->domain || (show_domains - machine_readable) > 0)
> printf("%04x:", p->domain);
> if you also change the case 'm' to set to 1 rather than increment.
Yes, it's a good hack, but probably more machine_readable than readable :-)
I would prefer the former version, since it makes the intention clearer.
Have a nice fortnight
Martin `MJ' Mares <mj at ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
Maintenance-free: When it breaks, it can't be fixed...
More information about the Pkg-pciutils-discuss