Skip to content

Commit

Permalink
LibC: Add mntent stub functions
Browse files Browse the repository at this point in the history
These functions are required by Qt but since we don't really need them
for just basic apps, let's leave the implementation for later.
  • Loading branch information
MartinBriza authored and linusg committed Jan 7, 2022
1 parent 3e066d3 commit f3490f9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Userland/Libraries/LibC/mntent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,25 @@ struct mntent* getmntent(FILE*)
TODO();
return nullptr;
}

FILE* setmntent(char const*, char const*)
{
dbgln("FIXME: Implement setmntent()");
TODO();
return nullptr;
}

int endmntent(FILE*)
{
dbgln("FIXME: Implement endmntent()");
TODO();
return 0;
}

struct mntent* getmntent_r(FILE*, struct mntent*, char*, int)
{
dbgln("FIXME: Implement getmntent_r()");
TODO();
return 0;
}
}
3 changes: 3 additions & 0 deletions Userland/Libraries/LibC/mntent.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ struct mntent {
};

struct mntent* getmntent(FILE* stream);
FILE* setmntent(char const* filename, char const* type);
int endmntent(FILE* streamp);
struct mntent* getmntent_r(FILE* streamp, struct mntent* mntbuf, char* buf, int buflen);

__END_DECLS

0 comments on commit f3490f9

Please sign in to comment.