Hi

On Sep 1, 2015 9:57 PM, "Stephen Warren" <swar...@wwwdotorg.org> wrote:
>
> On 08/22/2015 11:04 AM, Hans de Goede wrote:
> > Implement the necessary functions for implementing generic fs support
> > for ubifs.
>
> > diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
>
> > +int ubifs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
> > +{
> > +     /* Check that ubifs is mounted and that we are not being a blkdev
*/
> > +     if (!ubifs_mounted) {
> > +             printf("UBIFS not mounted, use ubifsmount to mount volume
first!\n");
> > +             return -1;
> > +     }
> > +
> > +     if (rbdd) {
> > +             printf("UBIFS cannot be used with normal block
devices\n");
> > +             return -1;
> > +     }
> > +
> > +     return 0;
> > +}
>
> I think those printf() should be debug(). Otherwise, if (a) someone
> attempts to run generic filesystem commands on a device with no
> filesystem or (b) we add new filesystems into fstypes[] after ubifs,
> those prints are going to happen even though a user didn't do something
> to explicitly cause a ubifs-related issue.
>

Personally I don't like return code like -1

Michael
_______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to