1
1
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:
kay.sievers@vrfy.org 2005-03-10 00:58:01 +01:00 committed by Greg KH
parent 2b40452ab3
commit 138068d690
27 changed files with 57 additions and 46 deletions

View 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)

View 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)

View 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);

View 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)

View 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)

View 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)

View 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;

View 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)

View 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;

View 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) {

View 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)

View 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;

View 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)

View 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)

View 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);

View 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)

View 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)

View 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 *)

View 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)

View 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);

View 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);

View 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

View 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)

View 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,

View 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));
}
}

View File

@ -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 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
#include <string.h>

View File

@ -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>