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