Merge of master-melb:xfs-cmds:24039a by kenmcd.
extern void doneline(char *input, char **vec);
extern char *fetchline(void);
-extern long long cvtnum(unsigned int blocksize,
- unsigned int sectorsize, char *s);
+extern long long cvtnum(size_t blocksize, size_t sectorsize, char *s);
extern void cvtstr(double value, char *str, size_t sz);
extern unsigned long cvttime(char *s);
}
}
if (range) {
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
if (optind != argc - 2)
return command_usage(&fadvise_cmd);
void
init_cvtnum(
- unsigned int *blocksize,
- unsigned int *sectsize)
+ size_t *blocksize,
+ size_t *sectsize)
{
if (!file || (file->flags & IO_FOREIGN)) {
*blocksize = 4096;
#define min(a,b) (((a)<(b))?(a):(b))
-extern void init_cvtnum(unsigned int *blocksize, unsigned int *sectsize);
+extern void init_cvtnum(size_t *blocksize, size_t *sectsize);
extern unsigned int recurse_dir;
extern void *buffer;
-extern ssize_t buffersize;
-extern int alloc_buffer(ssize_t, int, unsigned int);
+extern size_t buffersize;
+extern int alloc_buffer(size_t, int, unsigned int);
extern int read_buffer(int, off64_t, long long, long long *,
int, int);
extern void dump_buffer(off64_t, ssize_t);
size_t length;
void *start;
int advise = MADV_NORMAL, c;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
while ((c = getopt(argc, argv, "drsw")) != EOF) {
switch (c) {
{
off64_t offset;
size_t length;
+ size_t blocksize, sectsize;
void *start;
void *current, *previous;
unsigned char *vec;
int i;
- unsigned int blocksize, sectsize;
if (argc == 1) {
offset = mapping->offset;
ssize_t length;
void *address;
char *filename;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
int c, prot = 0;
if (argc == 1) {
ssize_t length;
void *start;
int c, flags = 0;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
while ((c = getopt(argc, argv, "ais")) != EOF) {
switch (c) {
char *bp;
void *start;
int dump = 0, rflag = 0, c;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
while ((c = getopt(argc, argv, "frv")) != EOF) {
switch (c) {
int seed = 'X';
int rflag = 0;
int c;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
while ((c = getopt(argc, argv, "rS:")) != EOF) {
switch (c) {
}
void *buffer;
-ssize_t highwater;
-ssize_t buffersize;
+size_t highwater;
+size_t buffersize;
int
alloc_buffer(
- ssize_t bsize,
+ size_t bsize,
int uflag,
unsigned int seed)
{
int verbose,
int onlyone)
{
- ssize_t bytes, bytes_requested;
+ size_t bytes_requested;
+ ssize_t bytes;
int ops = 0;
*total = 0;
char **argv)
{
off64_t offset;
- long long count, total;
- unsigned int blocksize, sectsize;
+ long long count, total, tmp;
+ size_t blocksize, sectsize;
struct timeval t1, t2;
char s1[64], s2[64], ts[64];
int Cflag, uflag, vflag;
while ((c = getopt(argc, argv, "b:Cuv")) != EOF) {
switch (c) {
case 'b':
- blocksize = cvtnum(blocksize, sectsize, optarg);
- if (blocksize < 0) {
+ tmp = cvtnum(blocksize, sectsize, optarg);
+ if (tmp < 0) {
printf(_("non-numeric bsize -- %s\n"), optarg);
return 0;
}
+ blocksize = tmp;
break;
case 'C':
Cflag = 1;
char *length,
xfs_flock64_t *segment)
{
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
init_cvtnum(&blocksize, §size);
memset(segment, 0, sizeof(*segment));
write_buffer(
off64_t offset,
long long count,
- ssize_t bs,
+ size_t bs,
int fd,
off64_t skip,
long long *total)
{
- ssize_t bytes, bytes_requested;
+ size_t bytes_requested;
+ ssize_t bytes;
long long bar = min(bs, count);
int ops = 0;
int argc,
char **argv)
{
+ size_t blocksize, sectsize;
off64_t offset, skip = 0;
- long long count, total;
+ long long count, total, tmp;
unsigned int seed = 0xcdcdcdcd;
- unsigned int blocksize, sectsize;
struct timeval t1, t2;
char s1[64], s2[64], ts[64];
char *sp, *infile = NULL;
while ((c = getopt(argc, argv, "b:Cdf:i:s:S:uwW")) != EOF) {
switch (c) {
case 'b':
- blocksize = cvtnum(blocksize, sectsize, optarg);
- if (blocksize < 0) {
+ tmp = cvtnum(blocksize, sectsize, optarg);
+ if (tmp < 0) {
printf(_("non-numeric bsize -- %s\n"), optarg);
return 0;
}
+ blocksize = tmp;
break;
case 'C':
Cflag = 1;
{
off64_t offset = 0;
long long count, total;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
struct timeval t1, t2;
char s1[64], s2[64], ts[64];
char *infile = NULL;
char **argv)
{
off64_t offset;
- unsigned int blocksize, sectsize;
+ size_t blocksize, sectsize;
init_cvtnum(&blocksize, §size);
offset = cvtnum(blocksize, sectsize, argv[1]);
long long
cvtnum(
- unsigned int blocksize,
- unsigned int sectorsize,
+ size_t blocksize,
+ size_t sectorsize,
char *s)
{
long long i;