libc

my libc
git clone git://git.evenfri.pw/libc.git
Log | Files | Refs | README

mount.c (423B)


      1 /*
      2  * mount.c - mount system call wrapper
      3  * Copyright (C) 2026. All rights reserved.
      4  */
      5 
      6 #include "libc.h"
      7 
      8 int mount(const char *src, const char *trg, const char *fstype, ulong_t flags,
      9     const void *data) {
     10   long ret = syscall(SYS_mount,
     11       (long)src,
     12       (long)trg,
     13       (long)fstype,
     14       (long)flags,
     15       (long)data,
     16       0);
     17 
     18   if (ret < 0) {
     19     errno = -ret;
     20     return -1;
     21   }
     22 
     23   return (int)ret;
     24 }