From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Mon, 14 Sep 2015 19:29:58 +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: <55F70416.1020103@redhat.com> 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 01-09-15 21:57, 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. Ack, will fix. Regards, Hans