CFLAGS="$tmp_flags"
])
-# check userland size_t type
-AC_DEFUN([LN_SIZE_T_LONG],
-[AC_MSG_CHECKING([size_t is unsigned long type])
-tmp_flags="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
-AC_COMPILE_IFELSE([
- #include <stdio.h>
- #include <linux/types.h>
- #include <linux/stddef.h>
- int main(void) {
- unsigned long *data1;
- size_t *data2 = NULL;
-
- data1 = data2;
- return 0;
- }
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_SIZE_T_LONG, 1,
- [size_t is long type])
-],[
- AC_MSG_RESULT([no])
-])
-CFLAGS="$tmp_flags"
-])
-
-AC_DEFUN([LN_SSIZE_T_LONG],
-[AC_MSG_CHECKING([ssize_t is signed long type])
-tmp_flags="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
-AC_COMPILE_IFELSE([
- #include <stdio.h>
- #include <linux/types.h>
- #include <linux/stddef.h>
- int main(void) {
- long *data1;
- ssize_t *data2 = NULL;
-
- data1 = data2;
- return 0;
- }
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_SSIZE_T_LONG, 1,
- [ssize_t is long type])
-],[
- AC_MSG_RESULT([no])
-])
-CFLAGS="$tmp_flags"
-])
-
-
# check kernel __le16, __le32 types
AC_DEFUN([LN_LE_TYPES],
[AC_MSG_CHECKING([__le16 and __le32 types are defined])
LN_STRUCT_SIGHAND
LN_FUNC_SHOW_TASK
LN_KERN__U64_LONG_LONG
-LN_SSIZE_T_LONG
-LN_SIZE_T_LONG
LN_LE_TYPES
LN_TASK_RCU
# 2.6.18
#define LPU64 "%llu"
#define LPD64 "%lld"
#define LPX64 "%#llx"
-#define LPSZ "%lu"
-#define LPSSZ "%ld"
# define LI_POISON ((int)0x5a5a5a5a)
# define LL_POISON ((long)0x5a5a5a5a)
# define LP_POISON ((void *)(long)0x5a5a5a5a)
# define LPF64 "l"
#endif
-#ifdef HAVE_SIZE_T_LONG
-# define LPSZ "%lu"
-#else
-# define LPSZ "%u"
-#endif
-
-#ifdef HAVE_SSIZE_T_LONG
-# define LPSSZ "%ld"
-#else
-# define LPSSZ "%d"
-#endif
-
#ifndef LPU64
# error "No word size defined"
#endif
# define LPU64 "%I64u"
# define LPD64 "%I64d"
# define LPX64 "%I64x"
-# define LPSZ "%lu"
-# define LPSSZ "%ld"
#elif (BITS_PER_LONG == 32 || __WORDSIZE == 32)
# define LPU64 "%I64u"
# define LPD64 "%I64d"
# define LPX64 "%I64x"
-# define LPSZ "%u"
-# define LPSSZ "%d"
#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
# define LPU64 "%I64u"
# define LPD64 "%I64d"
# define LPX64 "%I64x"
-# define LPSZ "%u"
-# define LPSSZ "%d"
#endif
#ifndef LPU64
# error "No word size defined"
case GMNAL_MSG_IMMEDIATE:
if (rx->rx_recv_nob < offsetof(gmnal_msg_t, gmm_u.immediate.gmim_payload[0])) {
- CERROR("Short IMMEDIATE from %u: %d("LPSZ")\n",
+ CERROR("Short IMMEDIATE from %u: %d(%lu)\n",
rx->rx_recv_gmid, rx->rx_recv_nob,
offsetof(gmnal_msg_t, gmm_u.immediate.gmim_payload[0]));
return -EPROTO;
# define LPU64 "%llu"
# define LPD64 "%lld"
# define LPX64 "%#llx"
-# define LPSZ "%u"
-# define LPSSZ "%d"
#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
# define LPU64 "%lu"
# define LPD64 "%ld"
# define LPX64 "%#lx"
-# define LPSZ "%lu"
-# define LPSSZ "%ld"
#endif
#endif /* !LPU64 */
ENTRY;
count = ll_file_get_iov_count(iov, &nr_segs);
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
- inode->i_ino, inode->i_generation, inode, count, *ppos);
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size=%lu,offset=%lld\n",
+ inode->i_ino, inode->i_generation, inode, (unsigned long)count,
+ *ppos);
/* "If nbyte is 0, read() will return 0 and have no other results."
* -- Single Unix Spec */
if (count == 0)
}
chunk = end - *ppos + 1;
- CDEBUG(D_INODE,"Read ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n",
- inode->i_ino, chunk, *ppos, i_size_read(inode));
+ CDEBUG(D_INODE,"Read ino %lu, %ld bytes, offset %lld, i_size %llu\n",
+ inode->i_ino, (long)chunk, *ppos, i_size_read(inode));
/* turn off the kernel's read-ahead */
if (ltd.lock_style != LL_LOCK_STYLE_NOLOCK) {
count = ll_file_get_iov_count(iov, &nr_segs);
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
- inode->i_ino, inode->i_generation, inode, count, *ppos);
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size=%lu,offset=%Ld\n",
+ inode->i_ino, inode->i_generation, inode, (unsigned long)count,
+ *ppos);
SIGNAL_MASK_ASSERT(); /* XXX BUG 1511 */
/* generic_file_write handles O_APPEND after getting i_mutex */
chunk = end - *ppos + 1;
- CDEBUG(D_INFO, "Writing inode %lu, "LPSZ" bytes, offset %Lu\n",
- inode->i_ino, chunk, *ppos);
+ CDEBUG(D_INFO, "Writing inode %lu, %ld bytes, offset %Lu\n",
+ inode->i_ino, (long)chunk, *ppos);
if (tree_locked) {
struct ost_lvb *xtimes;
/* write under locks
__u64 kms;
ENTRY;
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
- inode->i_ino, inode->i_generation, inode, count, *ppos);
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size=%lu,offset=%Ld\n",
+ inode->i_ino, inode->i_generation, inode, (unsigned long)count,
+ *ppos);
/* "If nbyte is 0, read() will return 0 and have no other results."
* -- Single Unix Spec */
ll_inode_size_unlock(inode, 1);
}
- CDEBUG(D_INFO, "Send ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n",
- inode->i_ino, count, *ppos, i_size_read(inode));
+ CDEBUG(D_INFO, "Send ino %lu, %lu bytes, offset %lld, i_size %llu\n",
+ inode->i_ino, (unsigned long)count, *ppos, i_size_read(inode));
ll_ra_read_init(in_file, &bead, *ppos, count);
/* BUG: 5972 */
__u64 kms;
ENTRY;
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
- inode->i_ino, inode->i_generation, inode, count, *ppos);
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size=%lu,offset=%Ld\n",
+ inode->i_ino, inode->i_generation, inode, (unsigned long)count,
+ *ppos);
/* "If nbyte is 0, read() will return 0 and have no other results."
* -- Single Unix Spec */
ll_inode_size_unlock(inode, 1);
}
- CDEBUG(D_INFO, "Send ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n",
- inode->i_ino, count, *ppos, i_size_read(inode));
+ CDEBUG(D_INFO, "Send ino %lu, %lu bytes, offset %lld, i_size %llu\n",
+ inode->i_ino, (unsigned long)count, *ppos, i_size_read(inode));
ll_ra_read_init(in_file, &bead, *ppos, count);
/* BUG: 5972 */
spin_unlock(&sbi->ll_process_lock);
}
-char lpszt[] = LPSZ;
-
static int ll_rw_offset_stats_seq_show(struct seq_file *seq, void *v)
{
struct timeval now;
seq_printf(seq, "%3s %10s %14s %14s %17s %17s %14s\n",
"R/W", "PID", "RANGE START", "RANGE END",
"SMALLEST EXTENT", "LARGEST EXTENT", "OFFSET");
- sprintf(format, "%s%s%s%s%s\n",
- "%3c %10d %14Lu %14Lu %17", lpszt+1, " %17", lpszt+1, " %14Ld");
+ sprintf(format, "%s\n", "%3c %10d %14Lu %14Lu %17lu %17lu %14Ld");
/* We stored the discontiguous offsets here; print them first */
for(i = 0; i < LL_OFFSET_HIST_MAX; i++) {
if (offset[i].rw_pid != 0)
- /* Is there a way to snip the '%' off of LPSZ? */
seq_printf(seq, format,
offset[i].rw_op ? 'W' : 'R',
offset[i].rw_pid,
offset[i].rw_range_start,
offset[i].rw_range_end,
- offset[i].rw_smallest_extent,
- offset[i].rw_largest_extent,
+ (unsigned long)offset[i].rw_smallest_extent,
+ (unsigned long)offset[i].rw_largest_extent,
offset[i].rw_offset);
}
/* Then print the current offsets for each process */
process[i].rw_pid,
process[i].rw_range_start,
process[i].rw_last_file_pos,
- process[i].rw_smallest_extent,
- process[i].rw_largest_extent,
+ (unsigned long)process[i].rw_smallest_extent,
+ (unsigned long)process[i].rw_largest_extent,
process[i].rw_offset);
}
spin_unlock(&sbi->ll_process_lock);
if (!lli->lli_smd || !lli->lli_smd->lsm_object_id)
RETURN(-EBADF);
- CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), size="LPSZ" (max %lu), "
- "offset=%lld=%llx, pages "LPSZ" (max %lu)\n",
- inode->i_ino, inode->i_generation, inode, count, MAX_DIO_SIZE,
- file_offset, file_offset, count >> CFS_PAGE_SHIFT,
+ CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), size=%lu (max %lu), "
+ "offset=%lld=%llx, pages %lu (max %lu)\n",
+ inode->i_ino, inode->i_generation, inode, (unsigned long)count,
+ MAX_DIO_SIZE, file_offset, file_offset,
+ (unsigned long)count >> CFS_PAGE_SHIFT,
MAX_DIO_SIZE >> CFS_PAGE_SHIFT);
if (rw == WRITE)
const int blkbits = inode->i_sb->s_blocksize_bits;
const int blksize = inode->i_sb->s_blocksize;
- CDEBUG(D_EXT2, "reading "LPSZ" at dir %lu+%llu\n",
- count, inode->i_ino, *off);
+ CDEBUG(D_EXT2, "reading %lu at dir %lu+%llu\n",
+ (unsigned long)count, inode->i_ino, *off);
while (count > 0) {
struct buffer_head *bh;
sizeof(struct llog_cookie);
int max_easize = sizeof(*lmmj);
- CDEBUG(D_INFO, "change the max md size from %d to "LPSZ"\n",
- mds->mds_max_mdsize, sizeof(*lmmj));
+ CDEBUG(D_INFO, "change the max md size from %d to %lu\n",
+ mds->mds_max_mdsize, (unsigned long)sizeof(*lmmj));
if (mds->mds_max_mdsize < max_easize ||
mds->mds_max_cookiesize < max_cookiesize) {
char buf[64];
int len, ret = 0;
- CDEBUG(D_INFO, "LPU64=%s, LPD64=%s, LPX64=%s, LPSZ=%s, LPSSZ=%s\n",
- LPU64, LPD64, LPX64, LPSZ, LPSSZ);
+ CDEBUG(D_INFO, "LPU64=%s, LPD64=%s, LPX64=%s\n", LPU64, LPD64, LPX64);
CDEBUG(D_INFO, "OBD_OBJECT_EOF = "LPX64"\n", (__u64)OBD_OBJECT_EOF);
len = i_size_read(file->f_dentry->d_inode);
CDEBUG(D_MOUNT, "Have %s, size %lu\n", MOUNT_DATA_FILE, len);
if (len != sizeof(*ldd)) {
- CERROR("disk data size does not match: see %lu expect "LPSZ"\n",
- len, sizeof(*ldd));
+ CERROR("disk data size does not match: see %lu expect %lu\n",
+ len, (unsigned long)sizeof(*ldd));
GOTO(out_close, rc = -EINVAL);
}