From 7ab88f29eae461f7e6aee819e2e6885921a173f2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 26 Jul 2004 21:40:23 +0000 Subject: [PATCH] misc-patches-20040726 Update .cvsignore files for windows ==================== This delta was composed from multiple commits as part of the CVS->Git migration. The checkin message with each commit was inconsistent. The following are the additional commit messages. ==================== cleanup uninitialized variables ==================== more dlls to be replaced ==================== When determining the full path of a UNC path, strip the server and share names --- .cvsignore | 5 +++++ src/WINNT/afssvrcfg/services_page.cpp | 4 ++-- src/WINNT/install/NSIS/OpenAFS.nsi | 20 ++++++++++---------- src/sys/pioctl_nt.c | 26 ++++++++++++++++++++------ 4 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.cvsignore b/.cvsignore index 36ed4a61e..bcd5ed6da 100644 --- a/.cvsignore +++ b/.cvsignore @@ -20,3 +20,8 @@ sun4x_57 autom4te.cache ID TAGS +dest +obj +NTLang.bat +NTMakefile +golast.bat diff --git a/src/WINNT/afssvrcfg/services_page.cpp b/src/WINNT/afssvrcfg/services_page.cpp index 091ca903d..50457394d 100644 --- a/src/WINNT/afssvrcfg/services_page.cpp +++ b/src/WINNT/afssvrcfg/services_page.cpp @@ -394,10 +394,10 @@ static void CheckEnableBak() static void CheckEnableSc() { - BOOL bSccEnable; + BOOL bSccEnable = TRUE; UINT uiSccStatusMsg; UINT uiSccActionMsg; - BOOL bScsEnable; + BOOL bScsEnable = TRUE; UINT uiScsStatusMsg; UINT uiScsActionMsg; diff --git a/src/WINNT/install/NSIS/OpenAFS.nsi b/src/WINNT/install/NSIS/OpenAFS.nsi index b36e204c7..8ed4eca32 100644 --- a/src/WINNT/install/NSIS/OpenAFS.nsi +++ b/src/WINNT/install/NSIS/OpenAFS.nsi @@ -2569,19 +2569,19 @@ Function AFSLangFiles ; Common files SetOutPath "$INSTDIR\Common" File "${AFS_CLIENT_BUILDDIR}\afs_config.exe" - File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll" !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR" !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR" !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR" - File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll" - File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll" - File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll" - File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll" - File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll" - File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll" - File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll" - File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll" - File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsadminutil.dll" "$INSTDIR\Common\afsadminutil.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll" "$INSTDIR\Common\afsclientadmin.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll" "$INSTDIR\Common\afsprocmgmt.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll" "$INSTDIR\Common\afsvosadmin.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll" "$INSTDIR\Common\TaAfsAppLib.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll" "$INSTDIR\Common\afsvosadmin.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll" "$INSTDIR\Common\afsbosadmin.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll" "$INSTDIR\Common\afscfgadmin.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afskasadmin.dll" "$INSTDIR\Common\afskasadmin.dll" "$INSTDIR" + !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll" "$INSTDIR\Common\afsptsadmin.dll" "$INSTDIR" SetOutPath "$INSTDIR\Common" diff --git a/src/sys/pioctl_nt.c b/src/sys/pioctl_nt.c index acffb5609..3bed3772e 100644 --- a/src/sys/pioctl_nt.c +++ b/src/sys/pioctl_nt.c @@ -122,7 +122,7 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) if ( tbuffer[i++] == '\\' ) count++; } - if (tbuffer[i] == 0) + if (fileNamep[i] == 0) tbuffer[i++] = '\\'; tbuffer[i] = 0; strcat(tbuffer, SMB_IOCTL_FILENAME); @@ -147,7 +147,7 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) if (tbuffer[i] == 0) tbuffer[i++] = '\\'; tbuffer[i] = 0; - strcat(tbuffer, SMB_IOCTL_FILENAME); + strcat(tbuffer, SMB_IOCTL_FILENAME_NOSLASH); } } } @@ -267,10 +267,24 @@ fs_GetFullPath(char *pathp, char *outPathp, long outSize) pathHasDrive = 0; } - if (*firstp == '\\' || *firstp == '/') { - /* already an absolute pathname, just copy it back */ - strcpy(outPathp, firstp); - return 0; + if ( firstp[0] == '\\' && firstp[1] == '\\') { + /* UNC path - strip off the server and sharename */ + int i, count; + for ( i=2,count=2; count < 4 && firstp[i]; i++ ) { + if ( firstp[i] == '\\' || firstp[i] == '/' ) { + count++; + } + } + if ( firstp[i] == 0 ) { + strcpy(outPathp,"\\"); + } else { + strcpy(outPathp,&firstp[--i]); + } + return 0; + } else if (firstp[0] == '\\' || firstp[0] == '/') { + /* already an absolute pathname, just copy it back */ + strcpy(outPathp, firstp); + return 0; } GetCurrentDirectory(sizeof(origPath), origPath); -- 2.39.5