fcntl: open should use a va_list

The current implementation of open requires the user to pass all three
args to the function. It should use a va_list and allow a user to
provide only the filename and flags.
This commit is contained in:
Dan Robertson
2018-03-09 02:24:25 +00:00
parent 284cc4eece
commit e306e3f855
4 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
int main(int argc, char** argv) {
creat("dup.out", 0777);
int fd1 = open("dup.out", 0, 0);
int fd1 = open("dup.out", 0);
int fd2 = dup(fd1);
printf("fd %d duped into fd %d\n", fd1, fd2);
close(fd1);