This looks like the same bug we are seeing in GParted:
https://bugzilla.gnome.org/show_bug.cgi?id=693955

This is caused by an incorrect test in mkdosfs whether a device is a
"hard disk":

    if (fstat(dev, &statbuf) < 0)
        die("unable to stat %s");
    if (!S_ISBLK(statbuf.st_mode)) {
        statbuf.st_rdev = 0;
        check = 0;
    } else
        /*
         * Ignore any 'full' fixed disk devices, if -I is not given.
         * On a MO-disk one doesn't need partitions.  The filesytem can go
         * directly to the whole disk.  Under other OSes this is known as
         * the 'superfloppy' format.  As I don't know how to find out if
         * this is a MO disk I introduce a -I (ignore) switch.  -Joey
         */
        if (!ignore_full_disk && ((statbuf.st_rdev & 0xff3f) == 0x0300 ||       
/* hda, hdb */
                                  (statbuf.st_rdev & 0xff0f) == 0x0800 ||       
/* sd */
                                  (statbuf.st_rdev & 0xff3f) == 0x0d00 ||       
/* xd */
                                  (statbuf.st_rdev & 0xff3f) == 0x1600) /* hdc, 
hdd */
        )
        die("Device partition expected, not making filesystem on entire device 
'%s' (use -I to override)");


It makes certain apparently incorrect assumptions about how raw device numbers 
for full disks vs. partitions look like.
(It also doesn't use major()/minor() on the raw device number, which looks not 
very portable or future-proof to me...)

** Bug watch added: GNOME Bug Tracker #693955
   https://bugzilla.gnome.org/show_bug.cgi?id=693955

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/935480

Title:
  mkdosfs refuses to run on /dev/loop0p1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dosfstools/+bug/935480/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to