9 FILE *fopendev(const struct dev_info
* dev
, const char *mode
)
21 flags
= O_WRONLY
| O_CREAT
| O_TRUNC
;
24 flags
= O_WRONLY
| O_CREAT
| O_APPEND
;
34 flags
= (flags
& ~(O_RDONLY
| O_WRONLY
)) | O_RDWR
;
37 fd
= opendev(file
, flags
);
42 return fdopen(fd
, mode
);