Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!hao!oddjob!gargoyle!ihnp4!ihuxy!acw From: acw@ihuxy.ATT.COM (Wu) Newsgroups: comp.os.minix Subject: Bug fix to MINIX 1.2 cp(1) and roff(1) Message-ID: <2026@ihuxy.ATT.COM> Date: Thu, 9-Jul-87 18:41:45 EDT Article-I.D.: ihuxy.2026 Posted: Thu Jul 9 18:41:45 1987 Date-Received: Sun, 12-Jul-87 07:24:42 EDT Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 32 Keywords: cp diff Here is the bug fix to MINIX 1.2 cp(1), One usage of cp: cp f1 f2 ... dir MINIX cp can copy even directories to `dir' and they appear as files. The fix is to check to make sure it is not directory before copying it. Use the fix command to apply this diff. ---------------------- cut here -------------------------- 63a64,73 > if (stat(argv[i],&sbuf) < 0) { > std_err(argv[i]); > std_err(": not found\n"); > continue; > } > if ((sbuf.st_mode & S_IFMT) == S_IFDIR) { > std_err(argv[i]); > std_err(": directory\n"); > continue; > } ---------------------- cut here -------------------------- The MINIX 1.1 roff.c invokes done(0) to flush the buffer before the end of main routine, but it is missing from MINIX 1.2 roff.c. To fix it, just add `done(0);' before the end of main(). Alex Wu AT&T Bell Labs, Naperville, Illinois UUCP: ihnp4!ihuxy!acw 312-979-0856