WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] POC: ncurses in stubdom

Ferenc Wagner, le Tue 28 Apr 2009 20:22:11 +0200, a écrit :
>  * fpathconf() is stubbed in main.c, because I don't understand the
>  issue yet.

Just use the implementation from the linux/ part of newlib, it should be
fine.

>  * access() is also blatantly stubbed, as it's pointless in stub
>  domains anyway.

No it's not.  It's just a matter of adding the interface to fsio.
Trying to open/close the file and returning appropriate errors should
already be enough to test the R_OK and W_OK cases, which are what
ncurses use in addition to X_OK which we could consider as always
successful for now.

>  * Most other changes are debatable as well, but they're quite small
>  and should be even smaller in the development version, where some
>  issues are already fixed.

Yes, please rebase to that.

Content-Description: Master patch against Xen-3.3.1
> diff -ru xen-3.3.1.orig/extras/mini-os/lib/sys.c 
> xen-3.3.1/extras/mini-os/lib/sys.c
> --- xen-3.3.1.orig/extras/mini-os/lib/sys.c   2009-01-05 12:26:58.000000000 
> +0100
> +++ xen-3.3.1/extras/mini-os/lib/sys.c        2009-04-28 19:43:43.151850562 
> +0200
> @@ -147,6 +147,16 @@
>      return 1;
>  }
>  
> +pid_t tcgetpgrp(int fd)
> +{
> +    return 1;
> +}
> +
> +pid_t getpgrp(void)
> +{
> +    return 1;
> +}
> +
>  char *getcwd(char *buf, size_t size)
>  {
>      snprintf(buf, size, "/");

Do not forget to put the
Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
To keep credits (as well as blame) properly assigned.

> diff -ru xen-3.3.1.orig/extras/mini-os/Makefile 
> xen-3.3.1/extras/mini-os/Makefile
> --- xen-3.3.1.orig/extras/mini-os/Makefile    2009-01-05 12:26:58.000000000 
> +0100
> +++ xen-3.3.1/extras/mini-os/Makefile 2009-04-28 19:43:43.151850562 +0200
> @@ -20,7 +20,7 @@
>  
>  # Define some default flags for linking.
>  LDLIBS := 
> -APP_LDLIBS := 
> +APP_LDLIBS := -lncurses
>  LDARCHLIB := -L$(OBJ_DIR)/$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME)
>  LDFLAGS_FINAL := -T $(TARGET_ARCH_DIR)/minios-$(XEN_TARGET_ARCH).lds

It shouldn't be there, but in your c-stubdom Makefile, just like regular
applications do.

> @@ -85,6 +87,7 @@
>  newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
>       tar xzf $<
>       patch -d $@ -p0 < newlib.patch
> +     patch -d $@ -p0 < ~/xen/newlib_memalign.patch

Just fold it into newlib.patch, no need to separate them.

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel