chiark / gitweb /
switch tools and volume_id from LGPL to GPLv2
[elogind.git] / extras / volume_id / volume_id / udf.c
index a378fa9fd1b4b39ef087e0c8fa74c8f7f28b50c1..f54ca87c8f9ff810e03be49aabeb7a37b98b4a68 100644 (file)
@@ -3,19 +3,9 @@
  *
  * Copyright (C) 2004 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 volume_descriptor {
        struct descriptor_tag {
-               __u16   id;
-               __u16   version;
-               __u8    checksum;
-               __u8    reserved;
-               __u16   serial;
-               __u16   crc;
-               __u16   crc_len;
-               __u32   location;
+               uint16_t        id;
+               uint16_t        version;
+               uint8_t         checksum;
+               uint8_t         reserved;
+               uint16_t        serial;
+               uint16_t        crc;
+               uint16_t        crc_len;
+               uint32_t        location;
        } __attribute__((__packed__)) tag;
        union {
                struct anchor_descriptor {
-                       __u32   length;
-                       __u32   location;
+                       uint32_t        length;
+                       uint32_t        location;
                } __attribute__((__packed__)) anchor;
                struct primary_descriptor {
-                       __u32   seq_num;
-                       __u32   desc_num;
+                       uint32_t        seq_num;
+                       uint32_t        desc_num;
                        struct dstring {
-                               __u8    clen;
-                               __u8    c[31];
+                               uint8_t clen;
+                               uint8_t c[31];
                        } __attribute__((__packed__)) ident;
                } __attribute__((__packed__)) primary;
        } __attribute__((__packed__)) type;
 } __attribute__((__packed__));
 
 struct volume_structure_descriptor {
-       __u8    type;
-       __u8    id[5];
-       __u8    version;
+       uint8_t         type;
+       uint8_t         id[5];
+       uint8_t         version;
 } __attribute__((__packed__));
 
 #define UDF_VSD_OFFSET                 0x8000
 
-int volume_id_probe_udf(struct volume_id *id, __u64 off)
+int volume_id_probe_udf(struct volume_id *id, uint64_t off)
 {
        struct volume_descriptor *vd;
        struct volume_structure_descriptor *vsd;