usbdevice opening problem.

"Deepak Katagade" <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.usb.user
Message-ID <[email protected]>
Hi All,
I am trying to access the usb device through the samba.After device is
mapped through the samba I am trying to open the device in my samba
code  to get the information of the device. My  device is detected as
below.

brw-rw---- 1   root  disk  8, 1 Dec 31 1969   /dev/sda1.

But through samba a different user will be logging in and trying to
access the device.In my samba code i am trying to open the device  to
get the file descriptor and its info.I am following steps to open the
device.

     fs = get_fs();
     set_fs(get_ds());
  if (  ( fd = sys_open("/dev/sda1",O_RDONLY,660)) < 0)){
     printk( " ");
  }
     set_fs();
When try to do this i will  get the error saying.
"Error in opening the device file -13"

But before opening if I change the group manually as below.
  chgrp -R user   /dev/sda1
I am able to open the device.

Please anybody can u tellme if there is any way to open my device
without changing the group manually.

I am using linux-2.6 kernel and my device will be automounted as
/dev/sda1    /content/media/sda1  type vfat (rw, noexec,nosuid, nodev,umask=0).

Thanks,
Deepak

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.