Specify the open mode
The mi_file_open() function takes as its third argument the open mode in which to open the operating-system file. The open mode specifies the ownership of the file.
The mi_file_open() function passes this open mode directly to the underlying operating-system call. The semantics for mode must match those that the underlying operating-system call supports.
For example, the mi_file_open() call in Figure 1 specifies an open mode of 0644:
- Read/write for owner
- Read-only for group
- Read-only for general public