ioctl

Viktor Vasilev viktor.vasilev at stud.tu-darmstadt.de
Sun May 13 16:51:47 UTC 2007


On Sunday 13 May 2007 18:17 Mohsen Pahlevanzadeh wrote:
> On 5/13/07, Viktor Vasilev <viktor.vasilev at stud.tu-darmstadt.de> wrote:
> > On Sunday 13 May 2007 15:59 Mohsen Pahlevanzadeh wrote:
> > > Dear all,
> > > I need to a code piece that it gets serial number of hdd.
> > > Please help me....
> >
> > For an ATA disk you can use the IOCATAGPARM ioctl to get the
> > information. See the attached C source for example. Be sure to have a
> > look
> > at /usr/src/sys/sys/ata.h for other relevant fields and sizes.
> >
> Dear all,
> When i compile it,gcc tell me that IOCATAGPARM isn't declare.
> May i patch for kernel?
> Yours,Mohsen

Maybe you just didn't install the src distribution. Please look at the 
handbook:

  
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html

the note that says "If there is not a /usr/src/sys directory on your 
system...".


Cheers,
Vik


More information about the freebsd-hackers mailing list