diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-03-10 00:58:01 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:51:00 -0700 |
commit | 138068d690d79e71239d3e776f01560afbabc1cb (patch) | |
tree | d390cc993fabdb7a2c8657e88e47823ddf0805d8 | |
parent | 2b40452ab3146322a88ae201a2eb534204c75d63 (diff) |
[PATCH] fix ia64 compile
27 files changed, 57 insertions, 46 deletions
diff --git a/extras/volume_id/volume_id/cramfs.c b/extras/volume_id/volume_id/cramfs.c index a8058646d1..0c76860013 100644 --- a/extras/volume_id/volume_id/cramfs.c +++ b/extras/volume_id/volume_id/cramfs.c @@ -58,7 +58,7 @@ int volume_id_probe_cramfs(struct volume_id *id, __u64 off) { 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); if (cs == NULL) diff --git a/extras/volume_id/volume_id/ext.c b/extras/volume_id/volume_id/ext.c index b7bdf05d97..4783642114 100644 --- a/extras/volume_id/volume_id/ext.c +++ b/extras/volume_id/volume_id/ext.c @@ -66,7 +66,7 @@ int volume_id_probe_ext(struct volume_id *id, __u64 off) { 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); if (es == NULL) diff --git a/extras/volume_id/volume_id/fat.c b/extras/volume_id/volume_id/fat.c index 58aa2aba05..f6d3699758 100644 --- a/extras/volume_id/volume_id/fat.c +++ b/extras/volume_id/volume_id/fat.c @@ -159,7 +159,7 @@ int volume_id_probe_vfat(struct volume_id *id, __u64 off) __u32 next; 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); if (vs == NULL) @@ -257,7 +257,7 @@ valid: /* the label may be an attribute in the root directory */ 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); dbg("expected entries 0x%x", root_dir_entries); @@ -302,7 +302,7 @@ fat32: dbg("next cluster %u", next); next_sect_off = (next - 2) * vs->sectors_per_cluster; 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 */ buf = volume_id_get_buffer(id, off + next_off, buf_size); diff --git a/extras/volume_id/volume_id/hfs.c b/extras/volume_id/volume_id/hfs.c index 327461c676..8c40975036 100644 --- a/extras/volume_id/volume_id/hfs.c +++ b/extras/volume_id/volume_id/hfs.c @@ -173,7 +173,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, __u64 off) struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; 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); if (buf == NULL) @@ -196,7 +196,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, __u64 off) off += (alloc_first_block * 512) + (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); if (buf == NULL) diff --git a/extras/volume_id/volume_id/highpoint.c b/extras/volume_id/volume_id/highpoint.c index e13fd6de61..72f7d28429 100644 --- a/extras/volume_id/volume_id/highpoint.c +++ b/extras/volume_id/volume_id/highpoint.c @@ -54,7 +54,7 @@ int volume_id_probe_highpoint_ataraid(struct volume_id *id, __u64 off) { 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); if (buf == NULL) diff --git a/extras/volume_id/volume_id/hpfs.c b/extras/volume_id/volume_id/hpfs.c index 3aa95fa839..96c63d5e1d 100644 --- a/extras/volume_id/volume_id/hpfs.c +++ b/extras/volume_id/volume_id/hpfs.c @@ -51,7 +51,7 @@ int volume_id_probe_hpfs(struct volume_id *id, __u64 off) { 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); if (hs == NULL) diff --git a/extras/volume_id/volume_id/iso9660.c b/extras/volume_id/volume_id/iso9660.c index ffccf609dc..d4ccb9db9c 100644 --- a/extras/volume_id/volume_id/iso9660.c +++ b/extras/volume_id/volume_id/iso9660.c @@ -68,7 +68,7 @@ int volume_id_probe_iso9660(struct volume_id *id, __u64 off) { 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); 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) break; 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_unicode16(id, is->iso.volume_id, BE, 32); found_svd = 1; diff --git a/extras/volume_id/volume_id/jfs.c b/extras/volume_id/volume_id/jfs.c index ac4eab502d..77fa095357 100644 --- a/extras/volume_id/volume_id/jfs.c +++ b/extras/volume_id/volume_id/jfs.c @@ -58,7 +58,7 @@ int volume_id_probe_jfs(struct volume_id *id, __u64 off) { 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); if (js == NULL) diff --git a/extras/volume_id/volume_id/linux_raid.c b/extras/volume_id/volume_id/linux_raid.c index 0ea8596ad6..e7db4031de 100644 --- a/extras/volume_id/volume_id/linux_raid.c +++ b/extras/volume_id/volume_id/linux_raid.c @@ -67,7 +67,7 @@ int volume_id_probe_linux_raid(struct volume_id *id, __u64 off, __u64 size) __u64 sboff; __u8 uuid[16]; - dbg("probing at offset %llu", off); + dbg("probing at offset 0x%llx", (unsigned long long) off); if (size < 0x10000) return -1; diff --git a/extras/volume_id/volume_id/linux_swap.c b/extras/volume_id/volume_id/linux_swap.c index 39a2c4aab3..e37a79be86 100644 --- a/extras/volume_id/volume_id/linux_swap.c +++ b/extras/volume_id/volume_id/linux_swap.c @@ -55,7 +55,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, __u64 off) const __u8 *buf; 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 */ for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) { diff --git a/extras/volume_id/volume_id/lvm.c b/extras/volume_id/volume_id/lvm.c index bfc2ef2343..d1e337dc35 100644 --- a/extras/volume_id/volume_id/lvm.c +++ b/extras/volume_id/volume_id/lvm.c @@ -59,7 +59,7 @@ int volume_id_probe_lvm1(struct volume_id *id, __u64 off) const __u8 *buf; 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); if (buf == NULL) @@ -85,7 +85,7 @@ int volume_id_probe_lvm2(struct volume_id *id, __u64 off) unsigned int soff; 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); if (buf == NULL) diff --git a/extras/volume_id/volume_id/mac.c b/extras/volume_id/volume_id/mac.c index 2e2db486f2..dcfacc2a69 100644 --- a/extras/volume_id/volume_id/mac.c +++ b/extras/volume_id/volume_id/mac.c @@ -61,7 +61,7 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, __u64 off) struct mac_driver_desc *driver; 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); 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; plen = be32_to_cpu(part->block_count) * bsize; 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].len = plen; diff --git a/extras/volume_id/volume_id/minix.c b/extras/volume_id/volume_id/minix.c index d9c9ea8ca9..d2f2a336d4 100644 --- a/extras/volume_id/volume_id/minix.c +++ b/extras/volume_id/volume_id/minix.c @@ -59,7 +59,7 @@ int volume_id_probe_minix(struct volume_id *id, __u64 off) { 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); if (ms == NULL) diff --git a/extras/volume_id/volume_id/msdos.c b/extras/volume_id/volume_id/msdos.c index fc2f99d4d0..47c94456e4 100644 --- a/extras/volume_id/volume_id/msdos.c +++ b/extras/volume_id/volume_id/msdos.c @@ -81,7 +81,7 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, __u64 off) struct msdos_partition_entry *part; 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); 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; 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); p->type = "msdos_extended_partition"; if (extended == 0) extended = off + poff; } else { 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)) 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; 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) next = extended + poff; } else { 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 */ while (id->partition_count < 4) diff --git a/extras/volume_id/volume_id/ntfs.c b/extras/volume_id/volume_id/ntfs.c index 84d6fbb843..8f31735a2d 100644 --- a/extras/volume_id/volume_id/ntfs.c +++ b/extras/volume_id/volume_id/ntfs.c @@ -118,7 +118,7 @@ int volume_id_probe_ntfs(struct volume_id *id, __u64 off) const __u8 *buf; 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); 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("clustersize 0x%x", cluster_size); - dbg("mftcluster %lli", mft_cluster); - dbg("mftoffset 0x%llx", mft_off); + dbg("mftcluster %llu", (unsigned long long) mft_cluster); + dbg("mftoffset 0x%llx", (unsigned long long) mft_off); dbg("cluster per mft_record %i", ns->cluster_per_mft_record); dbg("mft record size %i", mft_record_size); diff --git a/extras/volume_id/volume_id/reiserfs.c b/extras/volume_id/volume_id/reiserfs.c index 094062dba2..34cf167dc4 100644 --- a/extras/volume_id/volume_id/reiserfs.c +++ b/extras/volume_id/volume_id/reiserfs.c @@ -73,7 +73,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, __u64 off) struct reiser4_super_block *rs4; __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); if (buf == NULL) diff --git a/extras/volume_id/volume_id/romfs.c b/extras/volume_id/volume_id/romfs.c index fe5e5a4827..9c2b41bb86 100644 --- a/extras/volume_id/volume_id/romfs.c +++ b/extras/volume_id/volume_id/romfs.c @@ -50,7 +50,7 @@ int volume_id_probe_romfs(struct volume_id *id, __u64 off) { 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); if (rfs == NULL) diff --git a/extras/volume_id/volume_id/sysv.c b/extras/volume_id/volume_id/sysv.c index 6c4408d80c..d4745daa22 100644 --- a/extras/volume_id/volume_id/sysv.c +++ b/extras/volume_id/volume_id/sysv.c @@ -108,7 +108,7 @@ int volume_id_probe_sysv(struct volume_id *id, __u64 off) struct xenix_super *xs; 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) { vs = (struct sysv_super *) diff --git a/extras/volume_id/volume_id/udf.c b/extras/volume_id/volume_id/udf.c index 06b521545f..a378fa9fd1 100644 --- a/extras/volume_id/volume_id/udf.c +++ b/extras/volume_id/volume_id/udf.c @@ -85,7 +85,7 @@ int volume_id_probe_udf(struct volume_id *id, __u64 off) unsigned int loc; 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); if (vsd == NULL) diff --git a/extras/volume_id/volume_id/ufs.c b/extras/volume_id/volume_id/ufs.c index 37e74aee6f..d4f4db3d32 100644 --- a/extras/volume_id/volume_id/ufs.c +++ b/extras/volume_id/volume_id/ufs.c @@ -188,7 +188,7 @@ int volume_id_probe_ufs(struct volume_id *id, __u64 off) struct ufs_super_block *ufs; 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++) { ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800); diff --git a/extras/volume_id/volume_id/util.c b/extras/volume_id/volume_id/util.c index 6ae4d09927..22abc9cbf8 100644 --- a/extras/volume_id/volume_id/util.c +++ b/extras/volume_id/volume_id/util.c @@ -188,7 +188,7 @@ __u8 *volume_id_get_buffer(struct volume_id *id, __u64 off, unsigned int 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 */ if (off + len <= SB_BUFFER_SIZE) { 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 */ 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); buf_len = read(id->fd, id->sbbuf, off + 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 */ 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) return NULL; buf_len = read(id->fd, id->seekbuf, len); diff --git a/extras/volume_id/volume_id/volume_id.h b/extras/volume_id/volume_id/volume_id.h index 6719c1aa31..8287de28f6 100644 --- a/extras/volume_id/volume_id/volume_id.h +++ b/extras/volume_id/volume_id/volume_id.h @@ -21,7 +21,7 @@ #ifndef _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_UUID_SIZE 36 diff --git a/extras/volume_id/volume_id/xfs.c b/extras/volume_id/volume_id/xfs.c index 12a89aafcb..b8702a3fb3 100644 --- a/extras/volume_id/volume_id/xfs.c +++ b/extras/volume_id/volume_id/xfs.c @@ -58,7 +58,7 @@ int volume_id_probe_xfs(struct volume_id *id, __u64 off) { 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); if (xs == NULL) diff --git a/libsysfs/sysfs_dir.c b/libsysfs/sysfs_dir.c index 63eec7bb9a..ac3936656c 100644 --- a/libsysfs/sysfs_dir.c +++ b/libsysfs/sysfs_dir.c @@ -244,7 +244,7 @@ int sysfs_write_attribute(struct sysfs_attribute *sysattr, close(fd); return -1; } 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); /* * since we could not write user supplied number of bytes, diff --git a/namedev_parse.c b/namedev_parse.c index 942596121e..b19a5f26f5 100644 --- a/namedev_parse.c +++ b/namedev_parse.c @@ -338,7 +338,7 @@ static int namedev_parse(struct udevice *udev, const char *filename) continue; error: info("parse error %s, line %d:%d, rule skipped", - filename, lineno, temp - line); + filename, lineno, (int) (temp - line)); } } diff --git a/udev_libc_wrapper.h b/udev_libc_wrapper.h index 65f4e01c23..4d6d332c69 100644 --- a/udev_libc_wrapper.h +++ b/udev_libc_wrapper.h @@ -22,14 +22,24 @@ #ifndef _UDEV_LIBC_WRAPPER_H_ #define _UDEV_LIBC_WRAPPER_H_ -#ifdef asmlinkage -# undef asmlinkage -#endif +#undef asmlinkage #ifdef __i386__ -# define asmlinkage __attribute__((regparm(0))) +#define asmlinkage __attribute__((regparm(0))) +#else +#define asmlinkage +#endif + +#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 asmlinkage -# define asmlinkage +#ifndef __FD_ZERO +#define __FD_ZERO(set) ((void) memset ((void*) (set), 0, sizeof (fd_set))) #endif #include <string.h> @@ -21,7 +21,6 @@ */ #include <stddef.h> -#include <sys/wait.h> #include <signal.h> #include <unistd.h> #include <errno.h> @@ -31,6 +30,8 @@ #include <ctype.h> #include <dirent.h> #include <fcntl.h> +#include <sys/select.h> +#include <sys/wait.h> #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> |