libc

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

mount.c (380B)


      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 
     11   int ret = syscall(SYS_mount, 
     12       src, 
     13       trg, 
     14       fstype, 
     15       flags, 
     16       data);
     17 
     18   if (ret < 0) {
     19 		errno = -ret;
     20 		return -1;
     21 	}
     22 
     23   return ret;
     24 }