add open_read_close() and similar stuff

This commit is contained in:
Denis Vlasenko
2006-10-14 02:23:43 +00:00
parent 88ca067690
commit ea62077b85
38 changed files with 228 additions and 234 deletions

View File

@ -39,10 +39,8 @@ static void make_device(char *path, int delete)
if (!delete) {
strcat(path, "/dev");
fd = open(path, O_RDONLY);
len = read(fd, temp + 1, 64);
len = open_read_close(path, temp + 1, 64);
*temp++ = 0;
close(fd);
if (len < 1) return;
}