chiark / gitweb /
volume_id: add Veritas fs
[elogind.git] / extras / volume_id / volume_id / via_raid.c
index 393890eb28bf01937fe67c8d849521a4463117e0..2b741230162d7f4da53954c2f5f61bf015ab8c7f 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"
 #include "via_raid.h"
 
 struct via_meta {
-       __u16   signature;
-       __u8    version_number;
+       uint16_t        signature;
+       uint8_t         version_number;
        struct via_array {
-               __u16   disk_bits;
-               __u8    disk_array_ex;
-               __u32   capacity_low;
-               __u32   capacity_high;
-               __u32   serial_checksum;
+               uint16_t        disk_bits;
+               uint8_t         disk_array_ex;
+               uint32_t        capacity_low;
+               uint32_t        capacity_high;
+               uint32_t        serial_checksum;
        } __attribute((packed)) array;
-       __u32   serial_checksum[8];
-       __u8    checksum;
+       uint32_t        serial_checksum[8];
+       uint8_t         checksum;
 } __attribute__((packed));
 
 #define VIA_SIGNATURE          0xAA55
 
-int volume_id_probe_via_raid(struct volume_id *id, __u64 off, __u64 size)
+int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size)
 {
-       const __u8 *buf;
-       __u64 meta_off;
+       const uint8_t *buf;
+       uint64_t meta_off;
        struct via_meta *via;
 
        dbg("probing at offset 0x%llx, size 0x%llx",