frename.c
来自「嵌入式系统中文件系统源代码」· C语言 代码 · 共 57 行
C
57 行
/*************************************************************
File Name: rename.C *
**************************************************************
Programmer: Huang Giun-Haur
Last Modified Date: 1999/06/15
Compiler : Gnu Cross-compiler
Platform : X86 protection mode
Usage :
int FAT_rename(const char *oldname, const char *newname)
*************************************************************/
/*************************************************************
Header Files
**************************************************************/
#include <sys/syscall.h>
//#include "../../RDebug/include/RDebug.h"
#include "../../FileSys/include/FileSys.h"
#include "../include/fat1x.h"
#include "../include/cluster.h"
#ifdef FAT_ID
/* init.c */
extern unsigned long FATBytesPerCluster[];
extern int FATDirSemaphoreID;
extern unsigned short FATEndOfChain[16];
extern unsigned char FATType[DRIVE_NUM];
/* fat1x.c */
extern struct FAT_FILE **FATHandleTable;
/**** added by chilong 01/14/2002 ****/
/* init.c */
extern int FATFtableSemaphoreID;
/**** added by chilong 01/14/2002 ****/
/*************************************************************
Function: FAT_rename(oldname, newname)
Description:
rename an existing file/dir
Input:
oldname - old file/dir name
newname - new file/dir name
Output:
0: Success
-1: Failure
Note: oldname/newname can'be '\\'(root)
newname can't be duplicated
ThreadSafe:
**************************************************************/
/* 虫
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?