*
* 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
#include <string.h>
#include <errno.h>
#include <ctype.h>
-#include <asm/types.h>
#include "volume_id.h"
#include "logging.h"
#include "isw_raid.h"
struct isw_meta {
- __u8 sig[32];
- __u32 check_sum;
- __u32 mpb_size;
- __u32 family_num;
- __u32 generation_num;
+ uint8_t sig[32];
+ uint32_t check_sum;
+ uint32_t mpb_size;
+ uint32_t family_num;
+ uint32_t generation_num;
} __attribute__((packed));
#define ISW_SIGNATURE "Intel Raid ISM Cfg Sig. "
-int volume_id_probe_intel_software_raid(struct volume_id *id, __u64 off, __u64 size)
+int volume_id_probe_intel_software_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 isw_meta *isw;
dbg("probing at offset 0x%llx, size 0x%llx",
return -1;
volume_id_set_usage(id, VOLUME_ID_RAID);
- strncpy(id->type_version, &isw->sig[sizeof(ISW_SIGNATURE)-1], 6);
+ memcpy(id->type_version, &isw->sig[sizeof(ISW_SIGNATURE)-1], 6);
id->type = "isw_raid_member";
return 0;