defer to external rename(1) too

This commit is contained in:
tg 2016-07-26 21:50:46 +00:00
parent c8942b719d
commit dd281c52ec
4 changed files with 12 additions and 13 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.744 2016/07/25 21:05:19 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.745 2016/07/26 21:50:42 tg Exp $
# -*- mode: sh -*-
#-
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@ -30,7 +30,7 @@
# (2013/12/02 20:39:44) http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
expected-stdout:
@(#)MIRBSD KSH R53 2016/07/25
@(#)MIRBSD KSH R53 2016/07/26
description:
Check version of shell.
stdin:
@ -39,7 +39,7 @@ name: KSH_VERSION
category: shell:legacy-no
---
expected-stdout:
@(#)LEGACY KSH R53 2016/07/25
@(#)LEGACY KSH R53 2016/07/26
description:
Check version of legacy shell.
stdin:

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.301 2016/07/25 20:38:02 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.302 2016/07/26 21:50:44 tg Exp $");
#if HAVE_KILLPG
/*
@ -125,7 +125,7 @@ const struct builtin mkshbuiltins[] = {
{Tread, c_read},
{Tsgreadonly, c_typeset},
{"!realpath", c_realpath},
{Trename, c_rename},
{"~rename", c_rename},
{"*=return", c_exitreturn},
{Tsgset, c_set},
{"*=shift", c_shift},

9
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.405 2016/07/26 21:37:26 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.406 2016/07/26 21:50:45 tg Exp $
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
.\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
@ -3987,9 +3987,10 @@ Renames the file
to
.Ar to .
Both must be complete pathnames and on the same device.
This builtin is intended for emergency situations where
.Pa /bin/mv
becomes unusable, and directly calls
An external utility is preferred over this builtin,
which is intended for emergency situations
.Pq where Pa /bin/mv No becomes unusable
and directly calls
.Xr rename 2 .
.Pp
.It Ic return Op Ar status

6
sh.h
View File

@ -175,9 +175,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.779 2016/07/25 21:05:24 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.780 2016/07/26 21:50:46 tg Exp $");
#endif
#define MKSH_VERSION "R53 2016/07/25"
#define MKSH_VERSION "R53 2016/07/26"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES
@ -927,7 +927,6 @@ EXTERN const char Tredirection_dup[] E_INIT("can't finish (dup) redirection");
#define Tredirection (Tredirection_dup + 19)
EXTERN const char Treal_sp1[] E_INIT("real ");
EXTERN const char Treal_sp2[] E_INIT(" real ");
EXTERN const char Trename[] E_INIT("rename");
EXTERN const char Treq_arg[] E_INIT("requires an argument");
EXTERN const char Tselect[] E_INIT("select");
EXTERN const char Tsgset[] E_INIT("*=set");
@ -1074,7 +1073,6 @@ EXTERN const char T_devtty[] E_INIT("/dev/tty");
#define Tredirection "redirection"
#define Treal_sp1 "real "
#define Treal_sp2 " real "
#define Trename "rename"
#define Treq_arg "requires an argument"
#define Tselect "select"
#define Tsgset "*=set"