From: Samuel Thibault Subject: Re: POC: ncurses in stubdom Date: Tue, 28 Apr 2009 20:37:02 +0200 Message-ID: <20090428183702.GF5777@const.famille.thibault.fr> References: <87k5563r1v.fsf@tac.ki.iif.hu> <20090427182543.GD5965@const.famille.thibault.fr> <877i163pga.fsf@tac.ki.iif.hu> <20090427185955.GF5965@const.famille.thibault.fr> <873abt51e5.fsf@tac.ki.iif.hu> <20090427200544.GN5965@const.famille.thibault.fr> <87skjt3koh.fsf@tac.ki.iif.hu> <20090427211132.GR5965@const.famille.thibault.fr> <87eivc7jbg.fsf@tac.ki.iif.hu> <87ab607i5o.fsf_-_@tac.ki.iif.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <87ab607i5o.fsf_-_@tac.ki.iif.hu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ferenc Wagner Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ferenc Wagner, le Tue 28 Apr 2009 20:22:11 +0200, a =E9crit : > * 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.0000000= 00 +0100 > +++ xen-3.3.1/extras/mini-os/lib/sys.c 2009-04-28 19:43:43.151850562 +0= 200 > @@ -147,6 +147,16 @@ > return 1; > } > =20 > +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 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-o= s/Makefile > --- xen-3.3.1.orig/extras/mini-os/Makefile 2009-01-05 12:26:58.00000000= 0 +0100 > +++ xen-3.3.1/extras/mini-os/Makefile 2009-04-28 19:43:43.151850562 +02= 00 > @@ -20,7 +20,7 @@ > =20 > # Define some default flags for linking. > LDLIBS :=3D=20 > -APP_LDLIBS :=3D=20 > +APP_LDLIBS :=3D -lncurses > LDARCHLIB :=3D -L$(OBJ_DIR)/$(TARGET_ARCH_DIR) -l$(ARCH_LIB_NAME) > LDFLAGS_FINAL :=3D -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