Changeset 1678
- Timestamp:
- Dec 2, 2004, 7:41:20 AM (21 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.14
to1.15
r1677 r1678 289 289 int __libc_Back_fsFileStatFH(int fh, struct stat *pStat); 290 290 291 /** 292 * Renames a file or directory. 293 * 294 * @returns 0 on success. 295 * @returns Negative error code (errno.h) on failure. 296 * @param pszPathOld Old file path. 297 * @param pszPathNew New file path. 298 * 299 * @remark OS/2 doesn't preform the deletion of the pszPathNew atomically. 300 */ 301 int __libc_Back_fsRename(const char *pszPathOld, const char *pszPathNew); 291 302 292 303 /** @defgroup __libc_Back_io LIBC Backend - I/O and File Management. -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/misc/mkdir.c
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r1677 r1678 1 /* $Id: $ */ 2 /** @file 3 * 4 * mkdir. 5 * 6 * Copyright (c) 2004 knut st. osmundsen <bird@anduin.net> 7 * 8 * 9 * This file is part of InnoTek LIBC. 10 * 11 * InnoTek LIBC is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License as published 13 * by the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * InnoTek LIBC is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU Lesser General Public License for more details. 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * along with InnoTek LIBC; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * 25 */ 1 26 2 27 /******************************************************************************* -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsDirCreate.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r1677 r1678 38 38 #include <errno.h> 39 39 #include <InnoTekLIBC/backend.h> 40 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_ IO40 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS 41 41 #include <InnoTekLIBC/logstrict.h> 42 42 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsDirRemove.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1677 r1678 36 36 #include <errno.h> 37 37 #include <InnoTekLIBC/backend.h> 38 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_ IO38 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS 39 39 #include <InnoTekLIBC/logstrict.h> 40 40 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsFileStatFH.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1677 r1678 44 44 #include <InnoTekLIBC/libc.h> 45 45 #include <InnoTekLIBC/backend.h> 46 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_ IO46 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS 47 47 #include <InnoTekLIBC/logstrict.h> 48 48 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/b_fsSymlinkRead.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r1677 r1678 34 34 #include <errno.h> 35 35 #include <InnoTekLIBC/backend.h> 36 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_ IO36 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS 37 37 #include <InnoTekLIBC/logstrict.h> 38 38 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/rename.c
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r1677 r1678 1 /* sys/rename.c (emx+gcc) -- Copyright (c) 1992-1996 by Eberhard Mattes 2 -- Copyright (c) 2003-2004 by knut st. osmundsen */ 3 4 /******************************************************************************* 5 * Header Files * 6 *******************************************************************************/ 7 #include "libc-alias.h" 8 #define INCL_FSMACROS 9 #include <os2emx.h> 10 #include <stdio.h> 11 #include <stdlib.h> 12 #include <errno.h> 13 #include <emx/syscalls.h> 14 #include "syscalls.h" 15 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_IO 16 #include <InnoTekLIBC/logstrict.h> 17 #include <InnoTekLIBC/pathrewrite.h> 18 19 int _STD(rename)(const char *pszOldName, const char *pszNewName) 20 { 21 LIBCLOG_ENTER("pszOldName=%s pszNewName=%s\n", pszOldName, pszNewName); 22 ULONG rc; 23 int cch; 24 FS_VAR(); 25 26 /* 27 * Rewrite the specified paths. 28 */ 29 cch = __libc_PathRewrite(pszOldName, NULL, 0); 30 if (cch > 0) 31 { 32 char *pszRewritten = alloca(cch); 33 if (!pszRewritten) 34 { 35 errno = ENOMEM; 36 LIBCLOG_RETURN_INT(-1); 37 } 38 cch = __libc_PathRewrite(pszOldName, pszRewritten, cch); 39 if (cch > 0) 40 pszOldName = pszRewritten; 41 /* else happens when someone changes the rules between the two calls. */ 42 else if (cch < 0) 43 { 44 errno = EAGAIN; /* non-standard, I'm sure. */ 45 LIBCLOG_RETURN_INT(-1); 46 } 47 } 48 49 cch = __libc_PathRewrite(pszNewName, NULL, 0); 50 if (cch > 0) 51 { 52 char *pszRewritten = alloca(cch); 53 if (!pszRewritten) 54 { 55 errno = ENOMEM; 56 LIBCLOG_RETURN_INT(-1); 57 } 58 cch = __libc_PathRewrite(pszNewName, pszRewritten, cch); 59 if (cch > 0) 60 pszNewName = pszRewritten; 61 /* else happens when someone changes the rules between the two calls. */ 62 else if (cch < 0) 63 { 64 errno = EAGAIN; /* non-standard, I'm sure. */ 65 LIBCLOG_RETURN_INT(-1); 66 } 67 } 68 69 /* 70 * Rename it. 71 */ 72 FS_SAVE_LOAD(); 73 rc = DosMove((PCSZ)pszOldName, (PCSZ)pszNewName); 74 FS_RESTORE(); 75 if (rc) 76 { 77 _sys_set_errno(rc); 78 LIBCLOG_RETURN_INT(-1); 79 } 80 LIBCLOG_RETURN_INT(0); 81 } 1 /* dead */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.