[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/UNIKRAFT PATCH 2/2] lib/uksysinfo: Add sysinfo stub
Hey Felipe This patch fails the checkpath. Also, we should add a license to sysinfo.h. Thanks, Vlad On 01.10.2019 15:23, Felipe Huici wrote: > Add sysinfo stub, needed by lowjs build. > > Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx> > --- > lib/uksysinfo/exportsyms.uk | 1 + > lib/uksysinfo/include/sys/sysinfo.h | 37 > +++++++++++++++++++++++++++++++++++++ > lib/uksysinfo/sysinfo.c | 5 +++++ > 3 files changed, 43 insertions(+) > create mode 100644 lib/uksysinfo/include/sys/sysinfo.h > > diff --git a/lib/uksysinfo/exportsyms.uk b/lib/uksysinfo/exportsyms.uk > index 73e1fe99..d5131332 100644 > --- a/lib/uksysinfo/exportsyms.uk > +++ b/lib/uksysinfo/exportsyms.uk > @@ -1,5 +1,6 @@ > fpathconf > sysconf > +sysinfo > confstr > pathconf > getpagesize > diff --git a/lib/uksysinfo/include/sys/sysinfo.h > b/lib/uksysinfo/include/sys/sysinfo.h > new file mode 100644 > index 00000000..451a2004 > --- /dev/null > +++ b/lib/uksysinfo/include/sys/sysinfo.h > @@ -0,0 +1,37 @@ > +/* Taken from musl-1.1.19 */ > +#ifndef _SYS_SYSINFO_H > +#define _SYS_SYSINFO_H > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +#define SI_LOAD_SHIFT 16 > + > +struct sysinfo { > + unsigned long uptime; > + unsigned long loads[3]; > + unsigned long totalram; > + unsigned long freeram; > + unsigned long sharedram; > + unsigned long bufferram; > + unsigned long totalswap; > + unsigned long freeswap; > + unsigned short procs, pad; > + unsigned long totalhigh; > + unsigned long freehigh; > + unsigned mem_unit; > + char __reserved[256]; > +}; > + > +int sysinfo (struct sysinfo *); > +int get_nprocs_conf (void); > +int get_nprocs (void); > +long get_phys_pages (void); > +long get_avphys_pages (void); > + > +#ifdef __cplusplus > +} > +#endif > + > +#endif > diff --git a/lib/uksysinfo/sysinfo.c b/lib/uksysinfo/sysinfo.c > index b546d7bf..d7e2f80e 100644 > --- a/lib/uksysinfo/sysinfo.c > +++ b/lib/uksysinfo/sysinfo.c > @@ -57,6 +57,11 @@ static struct utsname utsname = { > #endif > }; > > +int sysinfo(struct sysinfo *info) > +{ > + return -1; > +} > + > long fpathconf(int fd __unused, int name __unused) > { > return 0; _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |