About ConfigFS and FunctionFS together

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Michal,

Recently I'm working with configfs and libusbg. I have been also using
FFS with it as it was merged in some recent kernel versions. While using
I have experienced some issue while mounting it. Let me describe my it:

$ cd /sys/kernel/config/usb_gadget
$ mkdir g1 
$ mkdir g1/functions/ffs.sdb

At this point I'm able to mount using:

$ mount sdb -t functionfs /tmp/sdb

But if I make a mistake and write:

$ mount sbd -t functionfs /tmp/sdb

I get:

mount: unknown filesystem type 'functionfs'

Wow that was quite amazing for me, so I have checked few times
/proc/filesystems and loaded modules and all looked fine. So I have used
strace and found out that error returned from syscall was -ENODEV. I
have started to look why such description is given to this error code.

I found out that kernel returns -ENODEV error which when file system
type has not been found. I look into code of ffs and found out that
ffs_fs_mount() also returns this error if it was unable to acquire given
device. I know that this error looks really suitable in this place but
it really hurts discoverability in userspace because you don't know
where did you make your typo in file system name or in dev name. I have
run through few other fs implementations and found out that they all
return -ENOENT if given device has not been found.

Maybe FFS should follow this convention or maybe convention should be
changed?

--
Best regards,
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux