X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fvolume_id%2Fvolume_id%2Fminix.c;h=b081afab493f3ffcf1d5f50e800565e592fc3f50;hb=2321ba6fd89635f321ec08fa3803aa7e20aa76bf;hp=d9c9ea8ca986b019006f413303152a369af9b8db;hpb=845d4751acc26596b827c937b84a9566cd050707;p=elogind.git diff --git a/extras/volume_id/volume_id/minix.c b/extras/volume_id/volume_id/minix.c index d9c9ea8ca..b081afab4 100644 --- a/extras/volume_id/volume_id/minix.c +++ b/extras/volume_id/volume_id/minix.c @@ -3,19 +3,9 @@ * * Copyright (C) 2005 Kay Sievers * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2 of the License. */ #ifndef _GNU_SOURCE @@ -32,7 +22,6 @@ #include #include #include -#include #include "volume_id.h" #include "logging.h" @@ -41,25 +30,25 @@ struct minix_super_block { - __u16 s_ninodes; - __u16 s_nzones; - __u16 s_imap_blocks; - __u16 s_zmap_blocks; - __u16 s_firstdatazone; - __u16 s_log_zone_size; - __u32 s_max_size; - __u16 s_magic; - __u16 s_state; - __u32 s_zones; + uint16_t s_ninodes; + uint16_t s_nzones; + uint16_t s_imap_blocks; + uint16_t s_zmap_blocks; + uint16_t s_firstdatazone; + uint16_t s_log_zone_size; + uint32_t s_max_size; + uint16_t s_magic; + uint16_t s_state; + uint32_t s_zones; } __attribute__((__packed__)); #define MINIX_SUPERBLOCK_OFFSET 0x400 -int volume_id_probe_minix(struct volume_id *id, __u64 off) +int volume_id_probe_minix(struct volume_id *id, uint64_t off) { struct minix_super_block *ms; - dbg("probing at offset %llu", off); + dbg("probing at offset 0x%llx", (unsigned long long) off); ms = (struct minix_super_block *) volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200); if (ms == NULL)