rminnichinitial1fcdf7916 years agoHistory
27 lines · 456 B · C
RawDownload
#include <u.h>#include <libc.h> /* * Format:  3 r  M    4 (0000000000457def 11 00)   8192      512 /rc/lib/rcmain */ intiounit(int fd){	int i, cfd;	char buf[128], *args[10]; 	snprint(buf, sizeof buf, "#d/%dctl", fd);	cfd = open(buf, OREAD);	if(cfd < 0)		return 0;	i = read(cfd, buf, sizeof buf-1);	close(cfd);	if(i <= 0)		return 0;	buf[i] = '\0';	if(tokenize(buf, args, nelem(args)) != nelem(args))		return 0;	return atoi(args[7]);}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t