[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


  • To: "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Wed, 27 Nov 2019 15:43:56 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5xKK1mU7/aPv28Dw2+qLP0yuTaRQgE4IFc6n2I8jEYw=; b=eclIavS97HROTu5WrK9/SidKpfSK/q3UF5XsD5lLkVypV0pcX1+lCXhCWV4uvAuqhwl/DSkZ2HUs15eeRPFuUR24qj3MmVwU1H2GYpq5khzRLBxk51nmvtP5AThW1AZeF7+f69/4jAn/7/JmeW+4id/KoY4s6Jsni6JHyo/SUDT2RnBB7mZDD5+fXlt/A2Rd5EFNjnLGtVsZtpWR4KH6zupHxPmIUbR30KmA1uESFVstvodyj78dHSZkTG/7D/2088s6NDhYieEoUZfclaFZ+VLflkmcR6fJMf8TpA5XzTLQuF5P2MOD7hzdUyilk2Xa3jUVHnIdqKPYnyRMO+m2Vw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ycjs0kVWiMb8kpwA4MC2nDiI4CfAZxPMX+84sALKhWkUlQuimTGp3hXeYJ3Uz7fvugDjta4D2mH1vlLjf0IbNKa3chWP5WWcfPd0lB2J4FHGy0LEhUf4+BmdtTlGl2aqewJivMq8DdN9xO35oZl6QS54uWe2MnZyIT4cokd8O70FcvXUoyBlPxlj1VolDR4XnLV84fQkrmzIYU6FY4lGkMc6PekQxew8IMapRvg/zzgbA9RpsUkxEgsg1xSeFXOxkfrXsB2zTDSfwSZecDIvBZFn1UMcwR+EZGNPV1jUWMtVJXLNf1ePbZE5rhjC1wyzsTBwT2JNIiBp4PpvBWOwng==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Delivery-date: Wed, 27 Nov 2019 15:44:03 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVeFMNq7jgdT35zk+qKY6pNeYGmKefgkwA
  • Thread-topic: [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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.