Bugzilla – Bug 145485
How to detect a laptop?
Last modified: 2006-01-25 17:31:02 UTC
For SL, NetworkManager should be enabled by default if the machine is a laptop. What method should I use to detect it? Currently I use hd_has_pcmcia, but Stano told me HAL should have something better(?). Can you advise me?
libhd 11.36 implements feature 100199. It reports the formfactor in the system record. In C it looks like: hd_t *hd; sys_info_t *st; char *form; hd = hd_list(hd_data, hw_sys, 1, NULL); if( hd->detail && hd->detail->type == hd_detail_sys && (st = hd->detail->sys.data) ) { form = st->formfactor; } yast already gets hw_sys for other things, you probably just have to make the formfactor field known to it. Note: formfactor is NULL if HAL says 'unknown'. Hm, made it libhd 12.0 now. After all it's an api change.
Thanks. Submitted yast2-hardware-detection-2.13.2. yast2-network-2.13.20 will use it.