chiark / gitweb /
switch tools and volume_id from LGPL to GPLv2
[elogind.git] / extras / volume_id / volume_id / promise_raid.c
index 8fda14945f80ce21a3d0d776d8b6a37f15abe05c..54832a888abd86c8c3ff0fcefa0dbeabc3ee1934 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 "promise_raid.h"
 
 struct promise_meta {
-       __u8    sig[24];
+       uint8_t sig[24];
 } __attribute__((packed));
 
 #define PDC_CONFIG_OFF         0x1200
 #define PDC_SIGNATURE          "Promise Technology, Inc."
 
-int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, __u64 off, __u64 size)
+int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, uint64_t size)
 {
-       const __u8 *buf;
+       const uint8_t *buf;
        struct promise_meta *pdc;
        unsigned int i;
        static unsigned int sectors[] = {
@@ -62,7 +51,7 @@ int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, __u64 off, __u6
                return -1;
 
        for (i = 0; sectors[i] != 0; i++) {
-               __u64 meta_off;
+               uint64_t meta_off;
 
                meta_off = ((size / 0x200) - sectors[i]) * 0x200;
                buf = volume_id_get_buffer(id, off + meta_off, 0x200);