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.
20 #include <sys/types.h>
28 int main(int argc, char **argv)
30 int lsectsize, psectsize;
34 fprintf(stderr, "Usage: %s device\n", argv[0]);
38 retval = ext2fs_get_device_sectsize(argv[1], &lsectsize);
40 com_err(argv[0], retval,
41 "while calling ext2fs_get_device_sectsize");
44 retval = ext2fs_get_device_phys_sectsize(argv[1], &psectsize);
46 com_err(argv[0], retval,
47 "while calling ext2fs_get_device_phys_sectsize");
50 printf("Device %s has logical/physical sector size of %d/%d.\n",
51 argv[1], lsectsize, psectsize);