[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Ext3 partition not appearing in df output



> PS - I added most of the fs types supported by mount

A type that I added a few days ago is sysv
(not yet checked or tested).

#define SYSV_SUPER_MAGIC        0xfd187e20

struct sysv_super_block {
        u_char  s_dummy1[504];
        u_char  s_magic[4];
        u_char  type[4];
};

#define sysvmagic(s)    ((uint) s.s_magic[0] + (((uint) s.s_magic[1]) << 8) + \
                         (((uint) s.s_magic[2]) << 16) + \
                         (((uint) s.s_magic[3]) << 24))

 * 2001-10-26 Tim Launchbury
 * added sysv magic.

    if (!type) {
            /* sector 1 */
            if (lseek(fd, 512 , SEEK_SET) != 512
                || read(fd, (char *) &svsb, sizeof(svsb)) != sizeof(svsb))
                    goto io_error;
            if (sysvmagic(svsb) == SYSV_SUPER_MAGIC )
                    type = "sysv";
    }

Andries





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]