*
* 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
#include <string.h>
#include <errno.h>
#include <ctype.h>
-#include <asm/types.h>
#include "volume_id.h"
#include "logging.h"
#include "romfs.h"
struct romfs_super {
- __u8 magic[8];
- __u32 size;
- __u32 checksum;
- __u8 name[0];
+ uint8_t magic[8];
+ uint32_t size;
+ uint32_t checksum;
+ uint8_t name[0];
} __attribute__((__packed__));
-int volume_id_probe_romfs(struct volume_id *id, __u64 off)
+int volume_id_probe_romfs(struct volume_id *id, uint64_t off)
{
struct romfs_super *rfs;
return -1;
if (memcmp(rfs->magic, "-rom1fs-", 4) == 0) {
- size_t len = strlen(rfs->name);
+ size_t len = strlen((char *)rfs->name);
if (len) {
volume_id_set_label_raw(id, rfs->name, len);