chiark / gitweb /
[PATCH] fix ia64 compile
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Wed, 9 Mar 2005 23:58:01 +0000 (00:58 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:51:00 +0000 (23:51 -0700)
27 files changed:
extras/volume_id/volume_id/cramfs.c
extras/volume_id/volume_id/ext.c
extras/volume_id/volume_id/fat.c
extras/volume_id/volume_id/hfs.c
extras/volume_id/volume_id/highpoint.c
extras/volume_id/volume_id/hpfs.c
extras/volume_id/volume_id/iso9660.c
extras/volume_id/volume_id/jfs.c
extras/volume_id/volume_id/linux_raid.c
extras/volume_id/volume_id/linux_swap.c
extras/volume_id/volume_id/lvm.c
extras/volume_id/volume_id/mac.c
extras/volume_id/volume_id/minix.c
extras/volume_id/volume_id/msdos.c
extras/volume_id/volume_id/ntfs.c
extras/volume_id/volume_id/reiserfs.c
extras/volume_id/volume_id/romfs.c
extras/volume_id/volume_id/sysv.c
extras/volume_id/volume_id/udf.c
extras/volume_id/volume_id/ufs.c
extras/volume_id/volume_id/util.c
extras/volume_id/volume_id/volume_id.h
extras/volume_id/volume_id/xfs.c
libsysfs/sysfs_dir.c
namedev_parse.c
udev_libc_wrapper.h
udevd.c

index a8058646d12686c19246ac89436b20b764193d3e..0c76860013dd64c62120143516bc051f68ddc523 100644 (file)
@@ -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)
index b7bdf05d97997ff7db2f7e6c24136cb561375f28..4783642114d44e2661f1b685b4c26de520c60ac9 100644 (file)
@@ -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)
index 58aa2aba058a7c5567e6cd43595b173f4a65eb73..f6d3699758e2dbc143708c11362459c7e5ce02dc 100644 (file)
@@ -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);
index 327461c676f1675b5b94022f74dec3f362e0cc41..8c409750364ca5377d0c4e5749b3ed5414fe7dab 100644 (file)
@@ -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)
index e13fd6de618d5df0a35dd93590155d242bfa561f..72f7d28429413e111aac2165718cf42fa6b61cb8 100644 (file)
@@ -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)
index 3aa95fa8397da25a32fd4739a6611e879973d4d7..96c63d5e1d033528da8415c2203b53438910acf7 100644 (file)
@@ -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)
index ffccf609dc50e5f80604f1774773faf8d93853c1..d4ccb9db9cbf1399674d036b6f70775fc70b9c54 100644 (file)
@@ -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;
index ac4eab502da1702b3cf447a0f9b6cd4c1d59f880..77fa095357b9045ae5f13f0a8791528bd040f7ae 100644 (file)
@@ -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)
index 0ea8596ad67cd1bd0804f9a4462b16ef10d8b60f..e7db4031de74810b5754f2e6dcd78fd21ced318e 100644 (file)
@@ -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;
index 39a2c4aab3ff19f8e2f866492a01a033ea841862..e37a79be863308722be9bfd32774fc5eb6d3a4e5 100644 (file)
@@ -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) {
index bfc2ef2343f27fea051604667102a13acc99b565..d1e337dc35fd8acd5de4058b8cece2ed0b29daa6 100644 (file)
@@ -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)
index 2e2db486f20e7c7ed8bd4af41986c68da491933d..dcfacc2a697bf3732dbe2496abefd76500c9eb03 100644 (file)
@@ -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;
index d9c9ea8ca986b019006f413303152a369af9b8db..d2f2a336d41f3a4382be1a6b832a1d1e39740df4 100644 (file)
@@ -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)
index fc2f99d4d00ea1b4058b43aee10bfa28a0588b2b..47c94456e48652eeb48104590ff4a1ae109fdc87 100644 (file)
@@ -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)
index 84d6fbb84381249047716b067f0a85b90bf9e913..8f31735a2db5685900aa97a4ae3437fab58cb7e1 100644 (file)
@@ -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);
 
index 094062dba20c1e8f329cce4dcee6cfd65c669099..34cf167dc4f22cddd0995986bc004eec30130484 100644 (file)
@@ -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)
index fe5e5a4827cae93521c6e8e161001e13fa5edbb7..9c2b41bb8677a348cbd334d9922f318090a5f40f 100644 (file)
@@ -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)
index 6c4408d80cb4f4434ea95318113c07716409a57a..d4745daa22bc011fde4017b32055a4f6cfa7a400 100644 (file)
@@ -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 *)
index 06b521545fcfd345d285f88c5ade1f0a3aacbd9e..a378fa9fd1b4b39ef087e0c8fa74c8f7f28b50c1 100644 (file)
@@ -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)
index 37e74aee6f94fdc340be9403a1a09c914e2b07e1..d4f4db3d32da85d9033e35895d987bca092d1a6f 100644 (file)
@@ -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);
index 6ae4d09927a8b8e485692b6b9f6f5f4bd68789f5..22abc9cbf8c7b5c212e3919dc529f6cbf1698a6f 100644 (file)
@@ -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);
index 6719c1aa311f8c14e2480d6a2526ea3d47dc6320..8287de28f61c86b992b75365915e3c19fa3dfbd3 100644 (file)
@@ -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
index 12a89aafcb207c8ec7f3689d8ae2266a3dca1e95..b8702a3fb3da02a74374cf5f996f57180c8d3d49 100644 (file)
@@ -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)
index 63eec7bb9ac06aa0e042d2a2cc530da636cfb294..ac3936656caabec9a39b7c052d0d719af248494b 100644 (file)
@@ -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,
index 942596121ec619113b46b61f986ee75ea533357b..b19a5f26f5a7eee908cf556423fc55af5f96068b 100644 (file)
@@ -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));
                }
        }
 
index 65f4e01c2340077b9ce9b876905e546f0d90da87..4d6d332c691255e7e1ae001c67d3933f83e47bb7 100644 (file)
 #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>
diff --git a/udevd.c b/udevd.c
index c2f2dd048b57a8e919628fb7d33d2f6c0583ee64..2cd3622ce011a5a04630ff8d05595dbd6d53fc81 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -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>