2 * tst_getsize.c --- this function tests the getsize function
4 * Copyright (C) 1997 by Theodore Ts'o.
7 * This file may be redistributed under the terms of the GNU Library
8 * General Public License, version 2.
21 #include <sys/types.h>
29 int main(int argc, const char *argv[])
35 fprintf(stderr, "%s device\n", argv[0]);
38 add_error_table(&et_ext2_error_table);
39 retval = ext2fs_get_device_size2(argv[1], 1024, &blocks);
41 com_err(argv[0], retval, "while getting device size");
44 printf("%s is device has %llu blocks.\n", argv[1],
45 (unsigned long long) blocks);