mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 06:25:25 +03:00
[PATCH] fix ia64 compile
This commit is contained in:
parent
2b40452ab3
commit
138068d690
@ -58,7 +58,7 @@ int volume_id_probe_cramfs(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct cramfs_super *cs;
|
struct cramfs_super *cs;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200);
|
cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200);
|
||||||
if (cs == NULL)
|
if (cs == NULL)
|
||||||
|
@ -66,7 +66,7 @@ int volume_id_probe_ext(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct ext2_super_block *es;
|
struct ext2_super_block *es;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200);
|
es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (es == NULL)
|
if (es == NULL)
|
||||||
|
@ -159,7 +159,7 @@ int volume_id_probe_vfat(struct volume_id *id, __u64 off)
|
|||||||
__u32 next;
|
__u32 next;
|
||||||
int maxloop;
|
int maxloop;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200);
|
vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200);
|
||||||
if (vs == NULL)
|
if (vs == NULL)
|
||||||
@ -257,7 +257,7 @@ valid:
|
|||||||
|
|
||||||
/* the label may be an attribute in the root directory */
|
/* the label may be an attribute in the root directory */
|
||||||
root_start = (reserved + fat_size) * sector_size;
|
root_start = (reserved + fat_size) * sector_size;
|
||||||
dbg("root dir start 0x%llx", root_start);
|
dbg("root dir start 0x%llx", (unsigned long long) root_start);
|
||||||
root_dir_entries = le16_to_cpu(vs->dir_entries);
|
root_dir_entries = le16_to_cpu(vs->dir_entries);
|
||||||
dbg("expected entries 0x%x", root_dir_entries);
|
dbg("expected entries 0x%x", root_dir_entries);
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ fat32:
|
|||||||
dbg("next cluster %u", next);
|
dbg("next cluster %u", next);
|
||||||
next_sect_off = (next - 2) * vs->sectors_per_cluster;
|
next_sect_off = (next - 2) * vs->sectors_per_cluster;
|
||||||
next_off = (start_data_sect + next_sect_off) * sector_size;
|
next_off = (start_data_sect + next_sect_off) * sector_size;
|
||||||
dbg("cluster offset 0x%llx", next_off);
|
dbg("cluster offset 0x%llx", (unsigned long long) next_off);
|
||||||
|
|
||||||
/* get cluster */
|
/* get cluster */
|
||||||
buf = volume_id_get_buffer(id, off + next_off, buf_size);
|
buf = volume_id_get_buffer(id, off + next_off, buf_size);
|
||||||
|
@ -173,7 +173,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, __u64 off)
|
|||||||
struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
|
struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
|
||||||
const __u8 *buf;
|
const __u8 *buf;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
|
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
@ -196,7 +196,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, __u64 off)
|
|||||||
|
|
||||||
off += (alloc_first_block * 512) +
|
off += (alloc_first_block * 512) +
|
||||||
(embed_first_block * alloc_block_size);
|
(embed_first_block * alloc_block_size);
|
||||||
dbg("hfs wrapped hfs+ found at offset 0x%llx", off);
|
dbg("hfs wrapped hfs+ found at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
|
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
|
@ -54,7 +54,7 @@ int volume_id_probe_highpoint_ataraid(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
const __u8 *buf;
|
const __u8 *buf;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200);
|
buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
|
@ -51,7 +51,7 @@ int volume_id_probe_hpfs(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct hpfs_super *hs;
|
struct hpfs_super *hs;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200);
|
hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (hs == NULL)
|
if (hs == NULL)
|
||||||
|
@ -68,7 +68,7 @@ int volume_id_probe_iso9660(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
union iso_super_block *is;
|
union iso_super_block *is;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
is = (union iso_super_block *) volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200);
|
is = (union iso_super_block *) volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (is == NULL)
|
if (is == NULL)
|
||||||
@ -90,7 +90,7 @@ int volume_id_probe_iso9660(struct volume_id *id, __u64 off)
|
|||||||
if (is == NULL || is->iso.type == ISO_VD_END)
|
if (is == NULL || is->iso.type == ISO_VD_END)
|
||||||
break;
|
break;
|
||||||
if (is->iso.type == ISO_VD_SUPPLEMENTARY) {
|
if (is->iso.type == ISO_VD_SUPPLEMENTARY) {
|
||||||
dbg("found ISO supplementary VD at offset 0x%llx", off + vd_offset);
|
dbg("found ISO supplementary VD at offset 0x%llx", (unsigned long long) (off + vd_offset));
|
||||||
volume_id_set_label_raw(id, is->iso.volume_id, 32);
|
volume_id_set_label_raw(id, is->iso.volume_id, 32);
|
||||||
volume_id_set_label_unicode16(id, is->iso.volume_id, BE, 32);
|
volume_id_set_label_unicode16(id, is->iso.volume_id, BE, 32);
|
||||||
found_svd = 1;
|
found_svd = 1;
|
||||||
|
@ -58,7 +58,7 @@ int volume_id_probe_jfs(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct jfs_super_block *js;
|
struct jfs_super_block *js;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200);
|
js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (js == NULL)
|
if (js == NULL)
|
||||||
|
@ -67,7 +67,7 @@ int volume_id_probe_linux_raid(struct volume_id *id, __u64 off, __u64 size)
|
|||||||
__u64 sboff;
|
__u64 sboff;
|
||||||
__u8 uuid[16];
|
__u8 uuid[16];
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
if (size < 0x10000)
|
if (size < 0x10000)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -55,7 +55,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, __u64 off)
|
|||||||
const __u8 *buf;
|
const __u8 *buf;
|
||||||
unsigned int page;
|
unsigned int page;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
/* the swap signature is at the end of the PAGE_SIZE */
|
/* the swap signature is at the end of the PAGE_SIZE */
|
||||||
for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) {
|
for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) {
|
||||||
|
@ -59,7 +59,7 @@ int volume_id_probe_lvm1(struct volume_id *id, __u64 off)
|
|||||||
const __u8 *buf;
|
const __u8 *buf;
|
||||||
struct lvm1_super_block *lvm;
|
struct lvm1_super_block *lvm;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800);
|
buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
@ -85,7 +85,7 @@ int volume_id_probe_lvm2(struct volume_id *id, __u64 off)
|
|||||||
unsigned int soff;
|
unsigned int soff;
|
||||||
struct lvm2_super_block *lvm;
|
struct lvm2_super_block *lvm;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200);
|
buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
|
@ -61,7 +61,7 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, __u64 off)
|
|||||||
struct mac_driver_desc *driver;
|
struct mac_driver_desc *driver;
|
||||||
struct mac_partition *part;
|
struct mac_partition *part;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off, 0x200);
|
buf = volume_id_get_buffer(id, off, 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
@ -122,7 +122,7 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, __u64 off)
|
|||||||
poff = be32_to_cpu(part->start_block) * bsize;
|
poff = be32_to_cpu(part->start_block) * bsize;
|
||||||
plen = be32_to_cpu(part->block_count) * bsize;
|
plen = be32_to_cpu(part->block_count) * bsize;
|
||||||
dbg("found '%s' partition entry at 0x%llx, len 0x%llx",
|
dbg("found '%s' partition entry at 0x%llx, len 0x%llx",
|
||||||
part->type, poff, plen);
|
part->type, (unsigned long long) poff, (unsigned long long) plen);
|
||||||
|
|
||||||
id->partitions[i].off = poff;
|
id->partitions[i].off = poff;
|
||||||
id->partitions[i].len = plen;
|
id->partitions[i].len = plen;
|
||||||
|
@ -59,7 +59,7 @@ int volume_id_probe_minix(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct minix_super_block *ms;
|
struct minix_super_block *ms;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
ms = (struct minix_super_block *) volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200);
|
ms = (struct minix_super_block *) volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (ms == NULL)
|
if (ms == NULL)
|
||||||
|
@ -81,7 +81,7 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, __u64 off)
|
|||||||
struct msdos_partition_entry *part;
|
struct msdos_partition_entry *part;
|
||||||
struct volume_id_partition *p;
|
struct volume_id_partition *p;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off, 0x200);
|
buf = volume_id_get_buffer(id, off, 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
@ -124,14 +124,14 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, __u64 off)
|
|||||||
p->partition_type_raw = part[i].sys_ind;
|
p->partition_type_raw = part[i].sys_ind;
|
||||||
|
|
||||||
if (is_extended(part[i].sys_ind)) {
|
if (is_extended(part[i].sys_ind)) {
|
||||||
dbg("found extended partition at 0x%llx", poff);
|
dbg("found extended partition at 0x%llx", (unsigned long long) poff);
|
||||||
volume_id_set_usage_part(p, VOLUME_ID_PARTITIONTABLE);
|
volume_id_set_usage_part(p, VOLUME_ID_PARTITIONTABLE);
|
||||||
p->type = "msdos_extended_partition";
|
p->type = "msdos_extended_partition";
|
||||||
if (extended == 0)
|
if (extended == 0)
|
||||||
extended = off + poff;
|
extended = off + poff;
|
||||||
} else {
|
} else {
|
||||||
dbg("found 0x%x data partition at 0x%llx, len 0x%llx",
|
dbg("found 0x%x data partition at 0x%llx, len 0x%llx",
|
||||||
part[i].sys_ind, poff, plen);
|
part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen);
|
||||||
|
|
||||||
if (is_raid(part[i].sys_ind))
|
if (is_raid(part[i].sys_ind))
|
||||||
volume_id_set_usage_part(p, VOLUME_ID_RAID);
|
volume_id_set_usage_part(p, VOLUME_ID_RAID);
|
||||||
@ -174,12 +174,12 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, __u64 off)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (is_extended(part[i].sys_ind)) {
|
if (is_extended(part[i].sys_ind)) {
|
||||||
dbg("found extended partition at 0x%llx", poff);
|
dbg("found extended partition at 0x%llx", (unsigned long long) poff);
|
||||||
if (next == 0)
|
if (next == 0)
|
||||||
next = extended + poff;
|
next = extended + poff;
|
||||||
} else {
|
} else {
|
||||||
dbg("found 0x%x data partition at 0x%llx, len 0x%llx",
|
dbg("found 0x%x data partition at 0x%llx, len 0x%llx",
|
||||||
part[i].sys_ind, poff, plen);
|
part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen);
|
||||||
|
|
||||||
/* we always start at the 5th entry */
|
/* we always start at the 5th entry */
|
||||||
while (id->partition_count < 4)
|
while (id->partition_count < 4)
|
||||||
|
@ -118,7 +118,7 @@ int volume_id_probe_ntfs(struct volume_id *id, __u64 off)
|
|||||||
const __u8 *buf;
|
const __u8 *buf;
|
||||||
const __u8 *val;
|
const __u8 *val;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200);
|
ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200);
|
||||||
if (ns == NULL)
|
if (ns == NULL)
|
||||||
@ -142,8 +142,8 @@ int volume_id_probe_ntfs(struct volume_id *id, __u64 off)
|
|||||||
|
|
||||||
dbg("sectorsize 0x%x", sector_size);
|
dbg("sectorsize 0x%x", sector_size);
|
||||||
dbg("clustersize 0x%x", cluster_size);
|
dbg("clustersize 0x%x", cluster_size);
|
||||||
dbg("mftcluster %lli", mft_cluster);
|
dbg("mftcluster %llu", (unsigned long long) mft_cluster);
|
||||||
dbg("mftoffset 0x%llx", mft_off);
|
dbg("mftoffset 0x%llx", (unsigned long long) mft_off);
|
||||||
dbg("cluster per mft_record %i", ns->cluster_per_mft_record);
|
dbg("cluster per mft_record %i", ns->cluster_per_mft_record);
|
||||||
dbg("mft record size %i", mft_record_size);
|
dbg("mft record size %i", mft_record_size);
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, __u64 off)
|
|||||||
struct reiser4_super_block *rs4;
|
struct reiser4_super_block *rs4;
|
||||||
__u8 *buf;
|
__u8 *buf;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200);
|
buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
|
@ -50,7 +50,7 @@ int volume_id_probe_romfs(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct romfs_super *rfs;
|
struct romfs_super *rfs;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200);
|
rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200);
|
||||||
if (rfs == NULL)
|
if (rfs == NULL)
|
||||||
|
@ -108,7 +108,7 @@ int volume_id_probe_sysv(struct volume_id *id, __u64 off)
|
|||||||
struct xenix_super *xs;
|
struct xenix_super *xs;
|
||||||
unsigned int boff;
|
unsigned int boff;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) {
|
for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) {
|
||||||
vs = (struct sysv_super *)
|
vs = (struct sysv_super *)
|
||||||
|
@ -85,7 +85,7 @@ int volume_id_probe_udf(struct volume_id *id, __u64 off)
|
|||||||
unsigned int loc;
|
unsigned int loc;
|
||||||
unsigned int clen;
|
unsigned int clen;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200);
|
vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200);
|
||||||
if (vsd == NULL)
|
if (vsd == NULL)
|
||||||
|
@ -188,7 +188,7 @@ int volume_id_probe_ufs(struct volume_id *id, __u64 off)
|
|||||||
struct ufs_super_block *ufs;
|
struct ufs_super_block *ufs;
|
||||||
int offsets[] = {0, 8, 64, 256, -1};
|
int offsets[] = {0, 8, 64, 256, -1};
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
for (i = 0; offsets[i] >= 0; i++) {
|
for (i = 0; offsets[i] >= 0; i++) {
|
||||||
ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800);
|
ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800);
|
||||||
|
@ -188,7 +188,7 @@ __u8 *volume_id_get_buffer(struct volume_id *id, __u64 off, unsigned int len)
|
|||||||
{
|
{
|
||||||
unsigned int buf_len;
|
unsigned int buf_len;
|
||||||
|
|
||||||
dbg("get buffer off 0x%llx(%llu), len 0x%x", off, off, len);
|
dbg("get buffer off 0x%llx(%llu), len 0x%x", (unsigned long long) off, (unsigned long long) off, len);
|
||||||
/* check if requested area fits in superblock buffer */
|
/* check if requested area fits in superblock buffer */
|
||||||
if (off + len <= SB_BUFFER_SIZE) {
|
if (off + len <= SB_BUFFER_SIZE) {
|
||||||
if (id->sbbuf == NULL) {
|
if (id->sbbuf == NULL) {
|
||||||
@ -199,7 +199,7 @@ __u8 *volume_id_get_buffer(struct volume_id *id, __u64 off, unsigned int len)
|
|||||||
|
|
||||||
/* check if we need to read */
|
/* check if we need to read */
|
||||||
if ((off + len) > id->sbbuf_len) {
|
if ((off + len) > id->sbbuf_len) {
|
||||||
dbg("read sbbuf len:0x%llx", off + len);
|
dbg("read sbbuf len:0x%llx", (unsigned long long) (off + len));
|
||||||
lseek(id->fd, 0, SEEK_SET);
|
lseek(id->fd, 0, SEEK_SET);
|
||||||
buf_len = read(id->fd, id->sbbuf, off + len);
|
buf_len = read(id->fd, id->sbbuf, off + len);
|
||||||
dbg("got 0x%x (%i) bytes", buf_len, buf_len);
|
dbg("got 0x%x (%i) bytes", buf_len, buf_len);
|
||||||
@ -224,7 +224,7 @@ __u8 *volume_id_get_buffer(struct volume_id *id, __u64 off, unsigned int len)
|
|||||||
|
|
||||||
/* check if we need to read */
|
/* check if we need to read */
|
||||||
if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) {
|
if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) {
|
||||||
dbg("read seekbuf off:0x%llx len:0x%x", off, len);
|
dbg("read seekbuf off:0x%llx len:0x%x", (unsigned long long) off, len);
|
||||||
if (lseek(id->fd, off, SEEK_SET) == -1)
|
if (lseek(id->fd, off, SEEK_SET) == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
buf_len = read(id->fd, id->seekbuf, len);
|
buf_len = read(id->fd, id->seekbuf, len);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifndef _VOLUME_ID_H_
|
#ifndef _VOLUME_ID_H_
|
||||||
#define _VOLUME_ID_H_
|
#define _VOLUME_ID_H_
|
||||||
|
|
||||||
#define VOLUME_ID_VERSION 39
|
#define VOLUME_ID_VERSION 40
|
||||||
|
|
||||||
#define VOLUME_ID_LABEL_SIZE 64
|
#define VOLUME_ID_LABEL_SIZE 64
|
||||||
#define VOLUME_ID_UUID_SIZE 36
|
#define VOLUME_ID_UUID_SIZE 36
|
||||||
|
@ -58,7 +58,7 @@ int volume_id_probe_xfs(struct volume_id *id, __u64 off)
|
|||||||
{
|
{
|
||||||
struct xfs_super_block *xs;
|
struct xfs_super_block *xs;
|
||||||
|
|
||||||
dbg("probing at offset %llu", off);
|
dbg("probing at offset 0x%llx", (unsigned long long) off);
|
||||||
|
|
||||||
xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200);
|
xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200);
|
||||||
if (xs == NULL)
|
if (xs == NULL)
|
||||||
|
@ -244,7 +244,7 @@ int sysfs_write_attribute(struct sysfs_attribute *sysattr,
|
|||||||
close(fd);
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
} else if ((unsigned int)length != len) {
|
} else if ((unsigned int)length != len) {
|
||||||
dprintf("Could not write %d bytes to attribute %s\n",
|
dprintf("Could not write %zd bytes to attribute %s\n",
|
||||||
len, sysattr->name);
|
len, sysattr->name);
|
||||||
/*
|
/*
|
||||||
* since we could not write user supplied number of bytes,
|
* since we could not write user supplied number of bytes,
|
||||||
|
@ -338,7 +338,7 @@ static int namedev_parse(struct udevice *udev, const char *filename)
|
|||||||
continue;
|
continue;
|
||||||
error:
|
error:
|
||||||
info("parse error %s, line %d:%d, rule skipped",
|
info("parse error %s, line %d:%d, rule skipped",
|
||||||
filename, lineno, temp - line);
|
filename, lineno, (int) (temp - line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,14 +22,24 @@
|
|||||||
#ifndef _UDEV_LIBC_WRAPPER_H_
|
#ifndef _UDEV_LIBC_WRAPPER_H_
|
||||||
#define _UDEV_LIBC_WRAPPER_H_
|
#define _UDEV_LIBC_WRAPPER_H_
|
||||||
|
|
||||||
#ifdef asmlinkage
|
#undef asmlinkage
|
||||||
# undef asmlinkage
|
|
||||||
#endif
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
# define asmlinkage __attribute__((regparm(0)))
|
#define asmlinkage __attribute__((regparm(0)))
|
||||||
|
#else
|
||||||
|
#define asmlinkage
|
||||||
#endif
|
#endif
|
||||||
#ifndef asmlinkage
|
|
||||||
# define asmlinkage
|
#ifndef __FD_SET
|
||||||
|
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
|
||||||
|
#endif
|
||||||
|
#ifndef __FD_CLR
|
||||||
|
#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
|
||||||
|
#endif
|
||||||
|
#ifndef __FD_ISSET
|
||||||
|
#define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0)
|
||||||
|
#endif
|
||||||
|
#ifndef __FD_ZERO
|
||||||
|
#define __FD_ZERO(set) ((void) memset ((void*) (set), 0, sizeof (fd_set)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
3
udevd.c
3
udevd.c
@ -21,7 +21,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -31,6 +30,8 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user