From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Trimarchi Date: Tue, 1 Sep 2015 22:01:05 +0200 Subject: [U-Boot] [PATCH v2 2/4] ubifs: Add functions for generic fs use In-Reply-To: <55E60327.4090402@wwwdotorg.org> References: <1440266693-15664-1-git-send-email-hdegoede@redhat.com> <1440266693-15664-3-git-send-email-hdegoede@redhat.com> <55E60327.4090402@wwwdotorg.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi On Sep 1, 2015 9:57 PM, "Stephen Warren" 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 at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot