summaryrefslogtreecommitdiff
path: root/getfsdev.c
blob: 6ccfceb35aecf1240326f6b242e21ff3e3a5152f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "rsync.h"

 int main(int argc, char *argv[])
{
	STRUCT_STAT st;

	while (--argc > 0) {
		if (stat(*++argv, &st) < 0) {
			fprintf(stderr, "Unable to stat `%s'\n", *argv);
			exit(1);
		}
		printf("%ld/%ld\n", (long)major(st.st_dev),
				    (long)minor(st.st_dev));
	}

	return 0;
}