chiark / gitweb /
switch tools and volume_id from LGPL to GPLv2
[elogind.git] / extras / volume_id / volume_id / minix.c
index d9c9ea8ca986b019006f413303152a369af9b8db..b081afab493f3ffcf1d5f50e800565e592fc3f50 100644 (file)
@@ -3,19 +3,9 @@
  *
  * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
  *
- *     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 <string.h>
 #include <errno.h>
 #include <ctype.h>
-#include <asm/types.h>
 
 #include "volume_id.h"
 #include "logging.h"
 
 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)