File: mapdevfs.c

package info (click to toggle)
debian-installer-utils 1.82%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 844 kB
  • ctags: 41
  • sloc: sh: 915; ansic: 115; makefile: 43
file content (23 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 *  map devfs names to old-style names
 *
 */

#include <debian-installer.h>

int main (int argc, char **argv) {
	static char buf[256];
	size_t len = sizeof(buf);

	if (argc != 2) {
		fprintf(stderr, "Wrong number of args: mapdevfs <path>\n");
		return 1;
	}

	if ((di_system_devfs_map_from(argv[1], buf, len))) {
		printf("%s\n", buf);
		return 0;
	}

	return 1;
}