[PATCH] usb: gadget: FunctionFS: Change returned error when device not found.

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

 



Dear Michal and Felipe,

According to my last conversation with Michal[1] I have
prepared patch which adjust error returning policy in function FS.

Previously when FunctionFS was unable to find device configured via
ConfigFS returned -ENODEV. This error looks quite suitable there but
by default kernel mount syscall returns -ENODEV when given fs type
has not been registered in kernel. This causes misleading error
when making a typo in device name:

$ mount sbd -t functionfs /tmp/sdb
mount: unknown filesystem type 'functionfs'

This patch adjust FFS error policy to be similar to other FS.
Now when ffs is unable to find a device -ENOENT is returned.
This gives nice and readable error while mounting:

$ mount sbd -t functionfs /tmp/sdb
mount: special device sbd does not exist

and

$ mount sdb -t functiofs /tmp/sdb
mount: unknown filesystem type 'functiofs'

Footnotes:

1 - http://www.spinics.net/lists/linux-usb/msg108052.html

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


Krzysztof Opasiak (1):
  usb: gadget: FunctionFS: Return -ENOENT instead of -ENODEV when
    device not found.

 drivers/usb/gadget/f_fs.c  |    4 ++--
 drivers/usb/gadget/g_ffs.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.7.9.5

--
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