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, char **argv)
31 int lsectsize, psectsize;
35 fprintf(stderr, "Usage: %s device\n", argv[0]);
39 retval = ext2fs_get_device_sectsize(argv[1], &lsectsize);
41 com_err(argv[0], retval,
42 "while calling ext2fs_get_device_sectsize");
45 retval = ext2fs_get_device_phys_sectsize(argv[1], &psectsize);
47 com_err(argv[0], retval,
48 "while calling ext2fs_get_device_phys_sectsize");
51 printf("Device %s has logical/physical sector size of %d/%d.\n",
52 argv[1], lsectsize, psectsize);