mknod /dev/mydevice c $major 0;
So I need to know the major number of my deivce in the
Makefile. I've read the Linux 'Device Driver'. There
is some information about this. I use the following
command to get the major number in my Makefile.
major=`awk "\\$2==\"$mymodule\" {printf \\$1}"
/proc/devices`
But when I use the 'make install' command to install
my driver, the following error returned.
major=`awk "\\==\"$ymodule\" {printf \\}"
/proc/devices`
awk: 0: unexpected character '\'
awk: line 1: syntax error at or near ==
make: *** [install] Error 2
What is wrong with my command? Can anyone tell me how
to get the major number in Makefile.
Thank you very much.
______________________________________________________________________
Find, Connect, Date! http://personals.yahoo.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/