From 3fa68858808c76ff3270de2c5fc77988fce47483 Mon Sep 17 00:00:00 2001 From: Abhay Koushal Date: Fri, 28 Jan 2022 14:53:39 +0530 Subject: [PATCH 1/4] lastaddr error resolved --- usertests.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usertests.c b/usertests.c index a1e97e72d4..642b4cbbc1 100644 --- a/usertests.c +++ b/usertests.c @@ -1458,7 +1458,11 @@ sbrktest(void) exit(); } lastaddr = (char*) (BIG-1); + + #pragma GCC diagnostic ignored "-Wstringop-overflow" *lastaddr = 99; + #pragma GCC diagnostic pop + // can one de-allocate? a = sbrk(0); From e3c7252b23a9d6212ea6110167ea46049eb9a160 Mon Sep 17 00:00:00 2001 From: Abhay Koushal Date: Fri, 28 Jan 2022 15:18:56 +0530 Subject: [PATCH 2/4] application added : yes --- Makefile | 1 + yes.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 yes.c diff --git a/Makefile b/Makefile index 09d790cf63..0919303ee3 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,7 @@ UPROGS=\ _usertests\ _wc\ _zombie\ + _yes\ fs.img: mkfs README $(UPROGS) ./mkfs fs.img README $(UPROGS) diff --git a/yes.c b/yes.c new file mode 100644 index 0000000000..c625b48f78 --- /dev/null +++ b/yes.c @@ -0,0 +1,12 @@ +#include "types.h" +#include "stat.h" +#include "user.h" + +int +main(int argc, char *argv[]) +{ + for (int i = 0; i < 100; i++) + printf(1, "%s\n", (argc>1? argv[1]: "y")); + // printf(1, "y\n"); + exit(); +} From 489e9c30a4f964501c681fd4aa19a64a6a2ba9df Mon Sep 17 00:00:00 2001 From: Abhay Koushal Date: Fri, 28 Jan 2022 15:24:29 +0530 Subject: [PATCH 3/4] Revert "application added : yes" This reverts commit e3c7252b23a9d6212ea6110167ea46049eb9a160. --- Makefile | 1 - yes.c | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100644 yes.c diff --git a/Makefile b/Makefile index 0919303ee3..09d790cf63 100644 --- a/Makefile +++ b/Makefile @@ -181,7 +181,6 @@ UPROGS=\ _usertests\ _wc\ _zombie\ - _yes\ fs.img: mkfs README $(UPROGS) ./mkfs fs.img README $(UPROGS) diff --git a/yes.c b/yes.c deleted file mode 100644 index c625b48f78..0000000000 --- a/yes.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "types.h" -#include "stat.h" -#include "user.h" - -int -main(int argc, char *argv[]) -{ - for (int i = 0; i < 100; i++) - printf(1, "%s\n", (argc>1? argv[1]: "y")); - // printf(1, "y\n"); - exit(); -} From d14a1e315b73b9d5f5c2e7f68fb740af9f773af2 Mon Sep 17 00:00:00 2001 From: Abhay Koushal Date: Fri, 28 Jan 2022 15:30:18 +0530 Subject: [PATCH 4/4] application : yes --- Makefile | 3 ++- yes.c | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 yes.c diff --git a/Makefile b/Makefile index 09d790cf63..537f5b4457 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,7 @@ UPROGS=\ _usertests\ _wc\ _zombie\ + _yes\ fs.img: mkfs README $(UPROGS) ./mkfs fs.img README $(UPROGS) @@ -250,7 +251,7 @@ qemu-nox-gdb: fs.img xv6.img .gdbinit EXTRA=\ mkfs.c ulib.c user.h cat.c echo.c forktest.c grep.c kill.c\ ln.c ls.c mkdir.c rm.c stressfs.c usertests.c wc.c zombie.c\ - printf.c umalloc.c\ + printf.c umalloc.c yes.c\ README dot-bochsrc *.pl toc.* runoff runoff1 runoff.list\ .gdbinit.tmpl gdbutil\ diff --git a/yes.c b/yes.c new file mode 100644 index 0000000000..a3464e63d2 --- /dev/null +++ b/yes.c @@ -0,0 +1,13 @@ +#include "types.h" +#include "stat.h" +#include "user.h" + +int +main(int argc, char *argv[]) +{ + for (int i = 0; i < 100; i++) + printf(1, "%s\n", (argc>1? argv[1]: "y")); + // printf(1, "y\n"); + exit(); +} +