strtobool is more flexible for the user and is more appropriate in the
context.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
const char *buf, size_t count)
{
ssize_t rc;
const char *buf, size_t count)
{
ssize_t rc;
- rc = kstrtouint(buf, 2, &ro);
+ rc = strtobool(buf, &ro);
ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count)
{
ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count)
{
- ret = kstrtouint(buf, 2, &nofua);
+ ret = strtobool(buf, &nofua);
ssize_t fsg_store_cdrom(struct fsg_lun *curlun, const char *buf, size_t count)
{
ssize_t fsg_store_cdrom(struct fsg_lun *curlun, const char *buf, size_t count)
{
- ret = kstrtouint(buf, 2, &cdrom);
+ ret = strtobool(buf, &cdrom);
ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf,
size_t count)
{
ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf,
size_t count)
{
- ret = kstrtouint(buf, 2, &removable);
+ ret = strtobool(buf, &removable);