Added a --no-cd option to support/lsh so that the script can be used by
[rsync/rsync.git] / getfsdev.c
CommitLineData
100b62bb
WD
1#include "rsync.h"
2
3 int main(int argc, char *argv[])
4{
5 STRUCT_STAT st;
42269620 6 int ret;
100b62bb
WD
7
8 while (--argc > 0) {
4f5b0756 9#ifdef USE_STAT64_FUNCS
42269620
WD
10 ret = stat64(*++argv, &st);
11#else
12 ret = stat(*++argv, &st);
13#endif
14 if (ret < 0) {
100b62bb
WD
15 fprintf(stderr, "Unable to stat `%s'\n", *argv);
16 exit(1);
17 }
18 printf("%ld/%ld\n", (long)major(st.st_dev),
19 (long)minor(st.st_dev));
20 }
21
22 return 0;
23}