aakash berde writes:
> can we port the same code from linux to solaris system?
> shall same ioctl() will work on solrais?
Maybe.
Some ioctls are defined by particular standards or common practices,
so that many UNIX and Unix-like systems support them, and porting is
thus trivial.
Others are not so fortunate. There are many ioctls that are private
to various implementations, that are specific to particular drivers,
and that vary in subtle ways between systems.
> I am asking this because ioctl.h file on solaris and linux is totally
> different. I just can not understand why so much difference.
They're different platforms and there's no common agreed-on standard
that specifies what _all_ ioctls must do.
> the base code is for 32 bit linux and I am working on 64 bit solaris
> kernel. Is this is the reason that same ioctl function is not working
> here.After some study I found that the _IOWR("r",20,struct var) is also
> declared differently on linux and solaris .
No, that's not the reason.
In general, at least for the properly-written drivers, the kernel's
STRUCT_DECL(9f) facility makes certain that 32-bit and 64-bit
applications both work fine on a 64-bit kernel. It adapts
automatically.
--
James Carlson, Solaris Networking <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code