Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int my_putstr(char *str)
- {
- int i;
- while (str[i] != '\0')
- {
- my_putchar(str[i]);
- i = i + 1;
- }
- return (0);
- }
- int fs_open_file(char *filepath)
- {
- open(filepath, O_PATH)
- if (read(filepath) == 0)
- {
- my_putstr("FAILURE");
- my_putchar('\n');
- return (84);
- }
- my_putstr("SUCCESS");
- my_putchar('\n');
- close(filepath)
- }
- int main(int argc, char **argv)
- {
- int i;
- i = 0;
- argc = 1;
- while (i < argc)
- {
- fs_open_file(argv);
- i = i + 1;
- }
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement