File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / rsync / getfsdev.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Mar 17 00:32:36 2021 UTC (3 years, 2 months ago) by misho
Branches: rsync, MAIN
CVS tags: v3_2_3, HEAD
rsync 3.2.3

#include "rsync.h"

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

	while (--argc > 0) {
#ifdef USE_STAT64_FUNCS
		ret = stat64(*++argv, &st);
#else
		ret = stat(*++argv, &st);
#endif
		if (ret < 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;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>