[Pcsclite-cvs-commit] r2139 - trunk/PCSC/src

Ludovic Rousseau rousseau at costa.debian.org
Sun Aug 13 16:24:31 UTC 2006


Author: rousseau
Date: 2006-08-13 16:24:30 +0000 (Sun, 13 Aug 2006)
New Revision: 2139

Modified:
   trunk/PCSC/src/sys_generic.h
   trunk/PCSC/src/sys_unix.c
Log:
remove unused functions.
SYS_Mknod() could not be compiled using tcc


Modified: trunk/PCSC/src/sys_generic.h
===================================================================
--- trunk/PCSC/src/sys_generic.h	2006-08-11 18:26:39 UTC (rev 2138)
+++ trunk/PCSC/src/sys_generic.h	2006-08-13 16:24:30 UTC (rev 2139)
@@ -43,24 +43,12 @@
 
 	int SYS_Chdir(const char *);
 
-	int SYS_Mkfifo(const char *, int);
-
-	int SYS_Mknod(const char *, int, int);
-
 	int SYS_GetUID(void);
 
 	int SYS_GetGID(void);
 
-	int SYS_Chown(const char *, int, int);
-
 	int SYS_ChangePermissions(char *, int);
 
-	int SYS_LockFile(int);
-
-	int SYS_LockAndBlock(int);
-
-	int SYS_UnlockFile(int);
-
 	int SYS_SeekFile(int, int);
 
 	int SYS_ReadFile(int, char *, int);
@@ -81,20 +69,14 @@
 
 	int SYS_Daemon(int, int);
 
-	int SYS_Wait(int, int);
-
 	int SYS_Stat(char *pcFile, struct stat *psStatus);
 
-	int SYS_Fstat(int);
-
 	int SYS_RandomInt(int, int);
 
 	int SYS_GetSeed(void);
 
 	void SYS_Exit(int);
 
-	int SYS_Rmdir(char *pcFile);
-
 	int SYS_Unlink(char *pcFile);
 
 #ifdef __cplusplus

Modified: trunk/PCSC/src/sys_unix.c
===================================================================
--- trunk/PCSC/src/sys_unix.c	2006-08-11 18:26:39 UTC (rev 2138)
+++ trunk/PCSC/src/sys_unix.c	2006-08-13 16:24:30 UTC (rev 2139)
@@ -164,16 +164,6 @@
 	return chdir(path);
 }
 
-INTERNAL int SYS_Mkfifo(const char *path, int mode)
-{
-	return mkfifo(path, mode);
-}
-
-INTERNAL int SYS_Mknod(const char *path, int mode, int dev)
-{
-	return mknod(path, mode, dev);
-}
-
 INTERNAL int SYS_GetUID(void)
 {
 	return getuid();
@@ -184,91 +174,6 @@
 	return getgid();
 }
 
-INTERNAL int SYS_Chown(const char *fname, int uid, int gid)
-{
-	return chown(fname, uid, gid);
-}
-
-INTERNAL int SYS_ChangePermissions(char *pcFile, int mode)
-{
-	return chmod(pcFile, mode);
-}
-
-/**
- * @brief Makes a non-blocking request to lock a file exclusively.
- *
- * @param[in] iHandle File descriptor.
- *
- * @return Error code.
- * @retval 0 Success.
- * @retval -1 An error ocurred.
- */
-INTERNAL int SYS_LockFile(int iHandle)
-{
-#ifdef HAVE_FLOCK
-	return flock(iHandle, LOCK_EX | LOCK_NB);
-#else
-	struct flock lock_s;
-
-	lock_s.l_type = F_WRLCK;
-	lock_s.l_whence = 0;
-	lock_s.l_start = 0L;
-	lock_s.l_len = 0L;
-
-	return fcntl(iHandle, F_SETLK, &lock_s);
-#endif
-}
-
-/**
- * @brief Makes a blocking request to lock a file exclusively.
- *
- * @param[in] iHandle File descriptor.
- *
- * @return Error code.
- * @retval 0 Success.
- * @retval -1 An error ocurred.
- */
-INTERNAL int SYS_LockAndBlock(int iHandle)
-{
-#ifdef HAVE_FLOCK
-	return flock(iHandle, LOCK_EX);
-#else
-	struct flock lock_s;
-
-	lock_s.l_type = F_RDLCK;
-	lock_s.l_whence = 0;
-	lock_s.l_start = 0L;
-	lock_s.l_len = 0L;
-
-	return fcntl(iHandle, F_SETLKW, &lock_s);
-#endif
-}
-
-/**
- * @brief Unlocks the file.
- *
- * @param[in] iHandle File descriptor.
- *
- * @return Error code.
- * @retval 0 Success.
- * @retval -1 An error ocurred.
- */
-INTERNAL int SYS_UnlockFile(int iHandle)
-{
-#ifdef HAVE_FLOCK
-	return flock(iHandle, LOCK_UN);
-#else
-	struct flock lock_s;
-
-	lock_s.l_type = F_UNLCK;
-	lock_s.l_whence = 0;
-	lock_s.l_start = 0L;
-	lock_s.l_len = 0L;
-
-	return fcntl(iHandle, F_SETLK, &lock_s);
-#endif
-}
-
 INTERNAL int SYS_SeekFile(int iHandle, int iSeekLength)
 {
 	int iOffset;
@@ -469,22 +374,11 @@
 #endif
 }
 
-INTERNAL int SYS_Wait(int iPid, int iWait)
-{
-	return waitpid(-1, 0, WNOHANG);
-}
-
 INTERNAL int SYS_Stat(char *pcFile, struct stat *psStatus)
 {
 	return stat(pcFile, psStatus);
 }
 
-INTERNAL int SYS_Fstat(int iFd)
-{
-	struct stat sStatus;
-	return fstat(iFd, &sStatus);
-}
-
 INTERNAL int SYS_RandomInt(int fStart, int fEnd)
 {
 	static int iInitialized = 0;
@@ -524,11 +418,6 @@
 	_exit(iRetVal);
 }
 
-INTERNAL int SYS_Rmdir(char *pcFile)
-{
-	return rmdir(pcFile);
-}
-
 INTERNAL int SYS_Unlink(char *pcFile)
 {
 	return unlink(pcFile);




More information about the Pcsclite-cvs-commit mailing list