Bug 145485 - How to detect a laptop?
Summary: How to detect a laptop?
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Beta 2
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Steffen Winterfeldt
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-25 13:52 UTC by Martin Vidner
Modified: 2006-01-25 17:31 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Vidner 2006-01-25 13:52:36 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?
Comment 1 Steffen Winterfeldt 2006-01-25 15:36:57 UTC
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.
Comment 2 Martin Vidner 2006-01-25 17:31:02 UTC
Thanks.
Submitted yast2-hardware-detection-2.13.2. yast2-network-2.13.20 will use it.