File: mapdevfs.c

package info (click to toggle)
debian-installer-utils 1.155
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 944 kB
  • sloc: sh: 1,001; ansic: 160; makefile: 62
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;
}