if we're gonna clean up...
Change-Id: I5ab03f29468577b62dacab41a67eadfd8c43f812
Reviewed-on: http://gerrit.openafs.org/2463
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
#define JAFSADMMETHODNOTFOUND 1052 // Trouble finding a Java method
#define JAFSADMFIELDNOTFOUND 1053 // Trouble finding a Java field
-// make an identity out of a full name (possibly including an instance )
+// make an identity out of a full name (possibly including an instance )
void internal_makeKasIdentity( const char *fullName, kas_identity_p who );
void internal_getUserClass( JNIEnv *env, jobject user );
// throw an exception with an error code
void throwException( JNIEnv *env, jclass *excCls, char *excClsName, jmethodID *initID, int code );
-// reclaim global memory used by exceptions
+// reclaim global memory used by exceptions
void reclaimExceptionMemory( JNIEnv *env, jclass cls );
int setError(JNIEnv *env, jobject *obj, int code);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDC_STATIC -1
#define IDS_INSTALLATION_FAILURE 0
-#define IDS_SCM_OPEN_FAILED 1
-#define IDS_SERVICE_CREATE_FAILED 2
-#define IDS_SERVICE_OPEN_FAILED 3
-#define IDS_SERVICE_QUERY_FAILED 4
-#define IDS_SERVICE_STOP_FAILED 5
-#define IDS_SERVICE_DELETE_FAILED 6
-#define IDS_REG_DELETE_VALUE_ERROR 7
-#define IDS_SERVICE_ENABLE_FAILED 8
-#define IDS_OLE_DLL_INSTALL_FAILED 9
+#define IDS_SCM_OPEN_FAILED 1
+#define IDS_SERVICE_CREATE_FAILED 2
+#define IDS_SERVICE_OPEN_FAILED 3
+#define IDS_SERVICE_QUERY_FAILED 4
+#define IDS_SERVICE_STOP_FAILED 5
+#define IDS_SERVICE_DELETE_FAILED 6
+#define IDS_REG_DELETE_VALUE_ERROR 7
+#define IDS_SERVICE_ENABLE_FAILED 8
+#define IDS_OLE_DLL_INSTALL_FAILED 9
#define IDS_OLE_DLL_UNINSTALL_FAILED 10
#define IDS_EXTENSION_DLL_UNINSTALL_FAILED 11
#define IDS_EXTENSION_DLL_INSTALL_FAILED 12
#define IDS_PRESERVE_LIGHT_CLIENT_CONFIG_INFO 32
#define IDS_PRESERVE_CC_CONFIG_INFO 33
-
+
#define IDD_LICENSE 36
#define IDC_LOGO 1000
#define IDC_MSG 1001
#define IDI_SPINSTOP 20009
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 37
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDI_MAIN 102
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
// take a few moments and examine their headers individually to
// see what they can do for your application.
//
- // Each header is associated with one source file, and each pair
- // can easily (well, hopefully easily) be copied off to other
+ // Each header is associated with one source file, and each pair
+ // can easily (well, hopefully easily) be copied off to other
// applications.
//
#include <WINNT/hashlist.h> // general-purpose list management code
* TranslateMessage (&msg);
* DispatchMessage (&msg);
* }
- *
+ *
* An equivalent technique is:
*
* AfsAppLib_MainPump();
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* PROGRESS DIALOGS ___________________________________________________________
*
- * The PROGRESSDISPLAY object is probably one of the most esoteric
+ * The PROGRESSDISPLAY object is probably one of the most esoteric
* utilities in this library. It provides a convenient way to package
* up a background thread, and associate it with a dialog telling the user
* what's going on. It sounds a little hokey, and honestly isn't that
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define WC_CHECKLIST TEXT("OpenAFS_CheckList")
-#define LB_GETCHECK (WM_USER+300) // int iItem=wp
+#define LB_GETCHECK (WM_USER+300) // int iItem=wp
#define LB_SETCHECK (WM_USER+301) // int iItem=wp, BOOL fChecked=lp
#define LBN_CLICKED BN_CLICKED
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
- *** COMMDLG
+ *** COMMDLG
*
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* struct {
* NMHDR hdr;
* // window- and message-specific elements ...
- * }
+ * }
* Thus, by casing the LPARAM value to LPNMHDR, information about the
* notification can be obtained from any notification structure.
* If a notification message is handled, the handler must return TRUE.
// HLISTITEM FastList_FindPrevious (HWND hList, HLISTITEM hItem)
//
#define FastList_FindFirst(_hList) \
- FastList_FindList(_hList,0,FLM_FINDLIST_FIRST)
+ FastList_FindList(_hList,0,FLM_FINDLIST_FIRST)
#define FastList_FindNext(_hList,_hItem) \
- FastList_FindList(_hList,_hItem,FLM_FINDLIST_NEXT)
+ FastList_FindList(_hList,_hItem,FLM_FINDLIST_NEXT)
#define FastList_FindPrevious(_hList,_hItem) \
- FastList_FindList(_hList,_hItem,FLM_FINDLIST_PREVIOUS)
+ FastList_FindList(_hList,_hItem,FLM_FINDLIST_PREVIOUS)
#define FastList_FindList(_hList,_hItem,_dwCode) \
(HLISTITEM)SendMessage (_hList, FLM_FINDLIST, (WPARAM)(_hItem), (LPARAM)(_dwCode))
#define FLM_FINDLIST (FLM_FIRST + 0x001D)
// HLISTITEM FastList_FindNextSibling (HWND hList, HLISTITEM hItem)
//
#define FastList_FindFirstInRoot(_hList) \
- FastList_FindTree(_hList,0,FLM_FINDTREE_CHILD)
+ FastList_FindTree(_hList,0,FLM_FINDTREE_CHILD)
#define FastList_FindParent(_hList,_hItem) \
- FastList_FindTree(_hList,_hItem,FLM_FINDTREE_PARENT)
+ FastList_FindTree(_hList,_hItem,FLM_FINDTREE_PARENT)
#define FastList_FindFirstChild(_hList,_hItem) \
- FastList_FindTree(_hList,_hItem,FLM_FINDTREE_CHILD)
+ FastList_FindTree(_hList,_hItem,FLM_FINDTREE_CHILD)
#define FastList_FindPreviousSibling(_hList,_hItem) \
- FastList_FindTree(_hList,_hItem,FLM_FINDTREE_PREVIOUS)
+ FastList_FindTree(_hList,_hItem,FLM_FINDTREE_PREVIOUS)
#define FastList_FindNextSibling(_hList,_hItem) \
- FastList_FindTree(_hList,_hItem,FLM_FINDTREE_NEXT)
+ FastList_FindTree(_hList,_hItem,FLM_FINDTREE_NEXT)
#define FastList_FindTree(_hList,_hItem,_dwCode) \
(HLISTITEM)SendMessage (_hList, FLM_FINDTREE, (WPARAM)(_hItem), (LPARAM)(_dwCode))
#define FLM_FINDTREE (FLM_FIRST + 0x001E)
// HLISTITEM FastList_FindNextSelected (HWND hList, HLISTITEM hItemPrevious)
//
#define FastList_FindFirstSelected(_hList) \
- FastList_FindNextSelected(_hList,0)
+ FastList_FindNextSelected(_hList,0)
#define FastList_FindNextSelected(_hList,_hItem) \
(HLISTITEM)SendMessage (_hList, FLM_FINDSELECTED, (WPARAM)(_hItem), 0)
#define FLM_FINDSELECTED (FLM_FIRST + 0x001F)
#define FastList_FindNextItem(_hList,_ppEnum) \
(HLISTITEM)SendMessage (_hList, FLM_FINDNEXTITEM, (WPARAM)(_ppEnum), 0)
#define FastList_FindClose(_hList,_ppEnum) \
- (void)SendMessage (_hList, FLM_FINDCLOSE, (WPARAM)(_ppEnum), 0)
+ (void)SendMessage (_hList, FLM_FINDCLOSE, (WPARAM)(_ppEnum), 0)
#define FLM_FINDITEM (FLM_FIRST + 0x0020)
#define FLM_FINDNEXTITEM (FLM_FIRST + 0x0021)
#define FLM_FINDCLOSE (FLM_FIRST + 0x0022)
// HLISTITEM FastList_FindNextVisible (HWND hList, HLISTITEM hItem)
//
#define FastList_FindFirstVisible(_hList) \
- FastList_FindVisible(_hList,0,FLM_FINDVISIBLE_FIRST)
+ FastList_FindVisible(_hList,0,FLM_FINDVISIBLE_FIRST)
#define FastList_FindNextVisible(_hList,_hItem) \
- FastList_FindVisible(_hList,_hItem,FLM_FINDVISIBLE_NEXT)
+ FastList_FindVisible(_hList,_hItem,FLM_FINDVISIBLE_NEXT)
#define FastList_FindVisible(_hList,_hItem,_dwCode) \
(HLISTITEM)SendMessage (_hList, FLM_FINDVISIBLE, (WPARAM)(_hItem), (LPARAM)(_dwCode))
#define FLM_FINDVISIBLE (FLM_FIRST + 0x0024)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* // Find all objects with 473 as a dwKey element. Since we're walking the
* // whole list, the ENUMERATION object will be deleted automatically.
*
- * for (LPENUM pEnum = pKey->FindFirst (&dwKeyFind); pEnum; pEnum = pEnum->FindNext())
+ * for (LPENUM pEnum = pKey->FindFirst (&dwKeyFind); pEnum; pEnum = pEnum->FindNext())
* {
* OBJECT *pObj = (OBJECT*)(pEnum->GetObject());
* printf ("%s", pObj->szText);
* // to free the ENUMERATION object explicitly.
*
* LPENUM pEnum;
- * if ((pEnum = pKey->FindFirst (&dwKeyFind)) != NULL)
+ * if ((pEnum = pKey->FindFirst (&dwKeyFind)) != NULL)
* {
* hl.Remove (pEnum->GetObject());
* delete pEnum;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
//
// AFSD_FLUSHVOL.H
-//
+//
// Include file for routines that handle flushing AFS volumes
// in response to System Power event notification such as
// Hibernate request.
#include <Winnetwk.h>
#include "fs_utils.h"
-// handles
+// handles
typedef struct _tagFLUSHVOLTHREADINFO {
HANDLE hEventPowerEvent;
HANDLE hEventResumeMain;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 2004, 2005, 2006, 2007 Secure Endpoints Inc.
* Copyright (c) 2003 SkyRope, LLC
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
+ *
+ * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
+ *
+ * - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- * - Neither the name of Skyrope, LLC nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
+ * - Neither the name of Skyrope, LLC nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
* specific prior written permission from Skyrope, LLC.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* Copyright (c) 2004, 2005, 2006 Secure Endpoints Inc.
* Copyright (c) 2003 SkyRope, LLC
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
+ *
+ * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
+ *
+ * - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- * - Neither the name of Skyrope, LLC nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
+ * - Neither the name of Skyrope, LLC nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
* specific prior written permission from Skyrope, LLC.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
int KFW_AFS_destroy_tickets_for_cell(char *);
int KFW_AFS_destroy_tickets_for_principal(char *);
int KFW_AFS_renew_expiring_tokens(void);
-int KFW_AFS_get_cred( char * username,
+int KFW_AFS_get_cred( char * username,
char * cell,
char * password,
int lifetime,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define LOCK_HIERARCHY_SERVER 640
#define LOCK_HIERARCHY_CALLBACK_GLOBAL 645
#define LOCK_HIERARCHY_SERVER_GLOBAL 650
-#define LOCK_HIERARCHY_CONN 660
+#define LOCK_HIERARCHY_CONN 660
#define LOCK_HIERARCHY_VOLUME_GLOBAL 670
#define LOCK_HIERARCHY_DNLC_GLOBAL 690
#define LOCK_HIERARCHY_FREELANCE_GLOBAL 700
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
typedef struct cm_aclent {
osi_queue_t q; /* for quick removal from LRUQ */
- afs_uint32 magic;
+ afs_uint32 magic;
struct cm_aclent *nextp; /* next guy same vnode */
struct cm_scache *backp; /* back ptr to vnode */
struct cm_user *userp; /* user whose access is cached */
-/*
- * Copyright 2007 Secure Endpoints Inc.
- *
+/*
+ * Copyright 2007 Secure Endpoints Inc.
+ *
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
cm_direnum_entry_t entry[1];
} cm_direnum_t;
-long cm_BPlusDirEnumerate(cm_scache_t *dscp, cm_user_t *userp, cm_req_t *reqp,
+long cm_BPlusDirEnumerate(cm_scache_t *dscp, cm_user_t *userp, cm_req_t *reqp,
afs_uint32 locked, clientchar_t *maskp, afs_uint32 fetchStatus, cm_direnum_t **enumpp);
long cm_BPlusDirNextEnumEntry(cm_direnum_t *enump, cm_direnum_entry_t **entrypp);
long cm_BPlusDirPeekNextEnumEntry(cm_direnum_t *enump, cm_direnum_entry_t **entrypp);
/************ Accessor Macros *****************************************/
-
+
/* low level definition of Nptr value usage */
#define nAdr(n) (n)->X
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
char *datap; /* data in this buffer */
afs_uint32 error; /* last error code, if CM_BUF_ERROR is set */
cm_user_t *userp; /* user who wrote to the buffer last */
-
+
/* fields added for the CM; locked by scp->mx */
afs_uint64 dataVersion; /* data version of this page */
afs_uint32 cmFlags; /* flags for cm */
extern cm_buf_t *buf_Find(struct cm_scache *, osi_hyper_t *);
extern cm_buf_t *buf_FindAllLocked(struct cm_scache *, osi_hyper_t *, afs_uint32 flags);
-
+
extern cm_buf_t *buf_FindAll(struct cm_scache *, osi_hyper_t *, afs_uint32 flags);
-
+
extern long buf_GetNewLocked(struct cm_scache *, osi_hyper_t *, cm_req_t *, cm_buf_t **);
extern long buf_Get(struct cm_scache *, osi_hyper_t *, cm_req_t *, cm_buf_t **);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define CM_CELL_MAGIC ('C' | 'E' <<8 | 'L'<<16 | 'L'<<24)
/* a cell structure */
-typedef struct cm_cell {
+typedef struct cm_cell {
afs_uint32 magic;
afs_int32 cellID; /* cell ID */
struct cm_cell *allNextp; /* locked by cm_cellLock */
extern void cm_RemoveCellFromIDHashTable(cm_cell_t *cellp);
-extern long cm_AddCellProc(void *rockp, struct sockaddr_in *addrp, char *namep,
+extern long cm_AddCellProc(void *rockp, struct sockaddr_in *addrp, char *namep,
unsigned short ipRank);
extern cm_cell_t *cm_UpdateCell(cm_cell_t * cp, afs_uint32 flags);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
cm_enumCellProc_t *procp,
void *rockp);
-extern long cm_SearchCellRegistry(afs_uint32 client,
+extern long cm_SearchCellRegistry(afs_uint32 client,
char *cellNamep, char *newCellNamep,
char *linkedNamep,
cm_configProc_t *procp, void *rockp);
-extern long cm_EnumerateCellRegistry(afs_uint32 client,
+extern long cm_EnumerateCellRegistry(afs_uint32 client,
cm_enumCellProc_t *procp,
void *rockp);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern unsigned short ConnDeadtimeout;
extern unsigned short HardDeadtimeout;
-extern DWORD RDRtimeout;
+extern DWORD RDRtimeout;
typedef struct cm_conn {
struct cm_conn *nextp; /* locked by cm_connLock */
#define CM_CONN_FLAG_FORCE_NEW 1
-/*
+/*
* structure used for tracking RPC progress
- * and for passing path info from the smb layer
+ * and for passing path info from the smb layer
* to the cache manager functions.
*/
typedef struct cm_req {
#define VSALVAGE 101 /* Volume needs salvage */
#define VNOVNODE 102 /* Bad vnode number quoted */
-#define VNOVOL 103 /* Volume not attached, doesn't exist,
+#define VNOVOL 103 /* Volume not attached, doesn't exist,
not created or not online */
#define VVOLEXISTS 104 /* Volume already exists */
#define VNOSERVICE 105 /* Volume is not in service (i.e. it's
* vos examine to find out the current
* restrictions. */
-#define VRESTARTING -100 /* server is restarting, otherwise similar to
+#define VRESTARTING -100 /* server is restarting, otherwise similar to
VBUSY above. This is negative so that old
cache managers treat it as "server is down"*/
extern long cm_ConnFromFID(struct cm_fid *, struct cm_user *, struct cm_req *,
cm_conn_t **);
-extern long cm_ConnFromVolume(struct cm_volume *volp, unsigned long volid,
+extern long cm_ConnFromVolume(struct cm_volume *volp, unsigned long volid,
struct cm_user *userp, cm_req_t *reqp,
cm_conn_t **connpp);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
osi_hyper_t offset; /* offset of buffers */
long length; /* # of bytes to be transferred */
int reserved; /* did we reserve multiple buffers? */
-
+
/* all of these buffers are held */
osi_queueData_t *bufListp; /* list of buffers involved in I/O */
osi_queueData_t *bufListEndp; /* list of buffers involved in I/O */
struct cm_user *userp);
extern void cm_ConsiderPrefetch(cm_scache_t *scp, osi_hyper_t *offsetp,
- afs_uint32 count,
+ afs_uint32 count,
cm_user_t *userp, cm_req_t *reqp);
extern long cm_ValidateDCache(void);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef __CM_DIR_ENV__
#define __CM_DIR_ENV__ 1
-/* These data structures are derived from src/dir/dir.h and should not
+/* These data structures are derived from src/dir/dir.h and should not
* be changed as they describe AFS3 wire protocol.
*
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
unsigned int key;
struct nc *next, *prev;
cm_scache_t *dirp, *vp;
- normchar_t name[CM_AFSNCNAMESIZE];
+ normchar_t name[CM_AFSNCNAMESIZE];
} cm_nc_t;
typedef struct {
int getAFSServerW(const cm_unichar_t *service, const cm_unichar_t *protocol, const cm_unichar_t *cellName,
unsigned short afsdbPort,
int *cellHostAddrs,
- cm_unichar_t cellHostNames[][MAXHOSTCHARS],
+ cm_unichar_t cellHostNames[][MAXHOSTCHARS],
unsigned short ports[],
unsigned short ipRanks[],
int *numServers, int *ttl);
-/* a supplement for the DJGPP gethostbyname ... which
+/* a supplement for the DJGPP gethostbyname ... which
never bothers calling a DNS server ... so this function
takes care of that. This should be called when you
failed with gethostbyname (as that WILL check for
#define DNS_RRCLASS_HS 4 // Hesiod
#define DNS_RRCLASS_WILD 255 // WildCard - all classes
-/*
+/*
* DNS AFSDB Resource Data Field
*/
typedef struct dns_afsdb_rr_hdr
#define DNS_AFSDB_RR_HDR_LEN sizeof(DNS_AFSDB_RR_HDR)
-/*
+/*
* DNS A Resource Data Field
*/
typedef struct dns_a_rr_hdr
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
unsigned short rank;
} cm_SPref_t;
-typedef struct cm_SPrefRequest {
+typedef struct cm_SPrefRequest {
unsigned short offset;
unsigned short num_servers;
unsigned short flags;
char *outDatap; /* output results assembled so far */
char *outAllocp; /* output results assembled so far */
afs_uint32 outCopied; /* # of output bytes copied back so far
-
+
/* flags */
afs_uint32 flags;
} cm_ioctl_t;
#define CM_IOCTLFLAG_DATAOUT 8 /* sending data from server to client */
-/*
+/*
* The cm_IoctlQueryOptions structure is designed to be extendible.
- * None of the fields are required but when specified
- * by the client and understood by the server will be
+ * None of the fields are required but when specified
+ * by the client and understood by the server will be
* used to more precisely specify the desired data.
*
- * size must be set to the size of the structure
+ * size must be set to the size of the structure
* sent by the client including any variable length
* data appended to the end of the static structure.
*
* been filled in and should be used.
*
* variable length data can be specified with fields
- * that include offsets to data appended to the
+ * that include offsets to data appended to the
* structure.
*
* when adding new fields you must:
*
* It is critical that flags be consistent across all
* implementations of the pioctl interface for a given
- * platform. This should be considered a public
+ * platform. This should be considered a public
* interface used by third party application developers.
*/
typedef struct cm_IoctlQueryOptions {
- afs_uint32 size;
+ afs_uint32 size;
afs_uint32 field_flags;
afs_uint32 literal;
cm_fid_t fid;
/*
* Copyright 2004, Secure Endpoints Inc.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_uint32 dirty;
cm_volume_t * volumeBaseAddress;
- cm_cell_t * cellBaseAddress;
+ cm_cell_t * cellBaseAddress;
cm_aclent_t * aclBaseAddress;
cm_scache_t * scacheBaseAddress;
cm_nc_t * dnlcBaseAddress;
cm_nc_t * ncfreelist;
cm_nc_t * nameCache;
- cm_nc_t ** nameHash;
+ cm_nc_t ** nameHash;
cm_buf_t * buf_freeListp;
cm_buf_t * buf_freeListEndp;
extern __out_ecount_full_z(*pcch_dest) __checkReturn __success(return != NULL) cm_utf8char_t *
cm_Utf16ToUtf8Alloc
(__in_ecount(cch_src) const cm_unichar_t * s,
- int cch_src,
+ int cch_src,
__out_ecount_full_opt(1) int *pcch_dest);
extern __out_ecount_full_z(*pcch_dest) __checkReturn __success(return != NULL) cm_unichar_t *
-/*
+/*
* Copyright (c) 2008 - Secure Endpoints Inc.
*/
-/*
- * The performance module when activated collects
- * data necessary to analyze the usage of the cache
+/*
+ * The performance module when activated collects
+ * data necessary to analyze the usage of the cache
* manager and establish recommendations for future
- * cache manager configuration changes.
+ * cache manager configuration changes.
*
- * As a starting point, the package will collect
+ * As a starting point, the package will collect
* a list of all FIDs accessed during the session
* which will be used to periodically analyzed the
* contents of the cm_buf_t, cm_scache_t, cm_volume_t
- * and cm_cell_t pools.
+ * and cm_cell_t pools.
*/
#define CM_FIDSTATS_FLAG_HAVE_SCACHE 0x01 /* set if cm_scache_t present */
#define CM_FIDSTATS_FLAG_HAVE_VOLUME 0x02 /* set on (vnode = 1) if cm_vol_t present */
#define CM_FIDSTATS_FLAG_RO 0x04
-#define CM_FIDSTATS_FLAG_PURERO 0x08
-#define CM_FIDSTATS_FLAG_CALLBACK 0x10
+#define CM_FIDSTATS_FLAG_PURERO 0x08
+#define CM_FIDSTATS_FLAG_CALLBACK 0x10
extern void cm_PerformanceTuningCheck(void);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
cm_scacheLock] */
osi_queue_t fileq; /* per-file list of locks [protected
by scp->rw]*/
-
+
cm_user_t *userp; /* The user to which this lock belongs
to [immutable; held] */
cm_scache_t *scp; /* The scache to which this lock
* by the file server in the most
* recent fetch status.
*/
-
+
/* bulk stat progress */
osi_hyper_t bulkStatProgress; /* track bulk stats of large dirs */
* in old info.
*/
#define CM_MERGEFLAG_STOREDATA 2 /* Merge due to storedata op */
-#define CM_MERGEFLAG_DIROP 4 /* Merge due to directory op */
+#define CM_MERGEFLAG_DIROP 4 /* Merge due to directory op */
/* hash define. Must not include the cell, since the callback revocation code
* doesn't necessarily know the cell in the case of a multihomed server
extern void cm_SyncOpDone(cm_scache_t *, struct cm_buf *, afs_uint32);
-extern void cm_MergeStatus(cm_scache_t * dscp, cm_scache_t * scp,
- struct AFSFetchStatus * statusp,
+extern void cm_MergeStatus(cm_scache_t * dscp, cm_scache_t * scp,
+ struct AFSFetchStatus * statusp,
struct AFSVolSync * volsyncp,
- struct cm_user *userp,
+ struct cm_user *userp,
cm_req_t *reqp,
afs_uint32 flags);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define CM_IPRANK_MED 30000 /* on same network */
#define CM_IPRANK_LOW 40000 /* on different networks */
-/* the maximum number of network interfaces that this client has */
+/* the maximum number of network interfaces that this client has */
#define CM_MAXINTERFACE_ADDR 16
extern void cm_InsertServerList(cm_serverRef_t** list,cm_serverRef_t* element);
-extern long cm_ChangeRankServer(cm_serverRef_t** list, cm_server_t* server);
+extern long cm_ChangeRankServer(cm_serverRef_t** list, cm_server_t* server);
-extern void cm_RandomizeServer(cm_serverRef_t** list);
+extern void cm_RandomizeServer(cm_serverRef_t** list);
extern void cm_FreeServer(cm_server_t* server);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* user structure
* no free references outside of cm_allUsersp
* there are held references from cm_conn_t.
- *
+ *
* All the fields in this structure are locked by the
* corresponding userp's userp->mx mutex.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
extern long cm_LookupInternal(cm_scache_t *dscp, clientchar_t *namep, long flags,
- cm_user_t *userp, cm_req_t *reqp,
+ cm_user_t *userp, cm_req_t *reqp,
cm_scache_t **outpScpp);
extern afs_int32 cm_TryBulkStat(cm_scache_t *dscp, osi_hyper_t *offsetp,
cm_user_t *userp, cm_req_t *reqp);
extern long cm_ApplyDir(cm_scache_t *scp, cm_DirFuncp_t funcp, void *parmp,
- osi_hyper_t *startOffsetp, cm_user_t *userp, cm_req_t *reqp,
+ osi_hyper_t *startOffsetp, cm_user_t *userp, cm_req_t *reqp,
cm_scache_t **retscp);
extern long cm_MakeDir(cm_scache_t *dscp, clientchar_t *lastNamep, long flags,
- cm_attr_t *attrp, cm_user_t *userp, cm_req_t *reqp,
+ cm_attr_t *attrp, cm_user_t *userp, cm_req_t *reqp,
cm_scache_t **scpp);
extern long cm_RemoveDir(cm_scache_t *dscp, fschar_t *lastNamep, clientchar_t *originalNamep,
unsigned int createDisp, cm_user_t *userp,
cm_req_t *reqp, cm_lock_data_t ** ldpp);
-extern long cm_CheckNTOpenDone(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp,
+extern long cm_CheckNTOpenDone(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp,
cm_lock_data_t ** ldpp);
extern long cm_CheckNTDelete(cm_scache_t *dscp, cm_scache_t *scp,
LARGE_INTEGER LOffset, LARGE_INTEGER LLength, cm_key_t key,
afs_uint32 flags, cm_user_t *userp, cm_req_t *reqp);
-extern long cm_LockCheckRead(cm_scache_t *scp,
- LARGE_INTEGER LOffset,
- LARGE_INTEGER LLength,
+extern long cm_LockCheckRead(cm_scache_t *scp,
+ LARGE_INTEGER LOffset,
+ LARGE_INTEGER LLength,
cm_key_t key);
extern long cm_LockCheckWrite(cm_scache_t *scp,
AFSCallBack callbacks[CM_BULKMAX];
} cm_bulkStat_t;
-extern afs_int32 cm_TryBulkStatRPC(cm_scache_t *dscp, cm_bulkStat_t *bbp,
+extern afs_int32 cm_TryBulkStatRPC(cm_scache_t *dscp, cm_bulkStat_t *bbp,
cm_user_t *userp, cm_req_t *reqp);
#endif /* __CM_VNODEOPS_H_ENV__ */
-/*
+/*
* Copyright (c) 2007 Secure Endpoints Inc.
*
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
* are met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * * Neither the name of the Secure Endpoints Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
+ * * Neither the name of the Secure Endpoints Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* This header file provides the definitions and prototypes
+/* This header file provides the definitions and prototypes
* which specify the AFS Cache Manager Volume Status Event
* Notification API
*/
long (__fastcall * dll_VolStatus_Network_Addr_Change)(void);
long (__fastcall * dll_VolStatus_Change_Notification)(afs_uint32 cellID, afs_uint32 volID, enum volstatus status);
/* version 2 */
- long (__fastcall * dll_VolStatus_Notify_DFS_Mapping)(afs_uint32 cellID, afs_uint32 volID,
+ long (__fastcall * dll_VolStatus_Notify_DFS_Mapping)(afs_uint32 cellID, afs_uint32 volID,
afs_uint32 vnodeID, afs_uint32 uniqID,
char *src, char *target);
- long (__fastcall * dll_VolStatus_Invalidate_DFS_Mapping)(afs_uint32 cellID, afs_uint32 volID,
+ long (__fastcall * dll_VolStatus_Invalidate_DFS_Mapping)(afs_uint32 cellID, afs_uint32 volID,
afs_uint32 vnodeID, afs_uint32 uniqID);
} dll_VolStatus_Funcs_t;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define CM_VOLUME_MAGIC ('V' | 'O' <<8 | 'L'<<16 | 'M'<<24)
-/*
+/*
*
*/
extern void cm_InitVolume(int newFile, long maxVols);
-extern long cm_FindVolumeByName(struct cm_cell *cellp, char *volNamep,
- struct cm_user *userp, struct cm_req *reqp,
+extern long cm_FindVolumeByName(struct cm_cell *cellp, char *volNamep,
+ struct cm_user *userp, struct cm_req *reqp,
afs_uint32 flags, cm_volume_t **outVolpp);
extern long cm_FindVolumeByID(struct cm_cell *cellp, afs_uint32 volumeID,
- cm_user_t *userp, cm_req_t *reqp,
+ cm_user_t *userp, cm_req_t *reqp,
afs_uint32 flags, cm_volume_t **outVolpp);
#define CM_GETVOL_FLAG_CREATE 1
extern long cm_ForceUpdateVolume(struct cm_fid *fidp, cm_user_t *userp,
cm_req_t *reqp);
-extern cm_serverRef_t **cm_GetVolServers(cm_volume_t *volp, afs_uint32 volume,
+extern cm_serverRef_t **cm_GetVolServers(cm_volume_t *volp, afs_uint32 volume,
cm_user_t *userp, cm_req_t *reqp);
extern void cm_ChangeRankVolume(cm_server_t *tsp);
extern long cm_CheckOfflineVolume(cm_volume_t *volp, afs_uint32 volID);
-extern void cm_CheckOfflineVolumeState(cm_volume_t *volp, cm_vol_state_t *statep,
- afs_uint32 volID, afs_uint32 *onlinep,
+extern void cm_CheckOfflineVolumeState(cm_volume_t *volp, cm_vol_state_t *statep,
+ afs_uint32 volID, afs_uint32 *onlinep,
afs_uint32 *volumeUpdatedp);
extern void cm_UpdateVolumeStatus(cm_volume_t *volp, afs_uint32 volID);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
- * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
+ * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
- * <mit-copyright.h>.
+ * <mit-copyright.h>.
*
- * Include file for the Kerberos library.
+ * Include file for the Kerberos library.
*/
/* Only one time, please */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
time_t last_logoff_t; /* most recent logoff time */
} smb_username_t;
-/* The SMB_USERNAMEFLAG_AFSLOGON is used to preserve the existence of an
+/* The SMB_USERNAMEFLAG_AFSLOGON is used to preserve the existence of an
* smb_username_t even when the refCount is zero. This is used to ensure
- * that tokens set to a username during the integrated logon process are
+ * that tokens set to a username during the integrated logon process are
* preserved until the SMB Session that will require the tokens is created.
* The cm_IoctlSetTokens() function when executed from the Network Provider
* connects to the AFS Client Service using the credentials of the machine
/* The SMB_USERNAMEFLAG_LOGOFF is used to indicate that the user most
* recently logged off at 'last_logoff_t'. The smb_username_t should not
- * be deleted even if the refCount is zero before 'last_logoff_t' +
+ * be deleted even if the refCount is zero before 'last_logoff_t' +
* 'smb_LogoffTransferTimeout' if 'smb_LogoffTokenTransfer' is non-zero.
* The smb_Daemon() thread is responsible for purging the expired objects */
unsigned short attribute; /* search attribute
* (used for extended protocol) */
clientchar_t tidPath[256]; /* tid path */
- clientchar_t relPath[1024]; /* relative path */
+ clientchar_t relPath[1024]; /* relative path */
clientchar_t mask[256]; /* search mask for V3 */
} smb_dirSearch_t;
} smb_dirListPatch_t;
/* dirListPatch Flags */
-#define SMB_DIRLISTPATCH_DOTFILE 1
+#define SMB_DIRLISTPATCH_DOTFILE 1
/* the file referenced is a dot file
- * Note: will not be set if smb_hideDotFiles is false
+ * Note: will not be set if smb_hideDotFiles is false
*/
/* individual lock on a waiting lock request */
extern cm_user_t *smb_FindCMUserByName(clientchar_t *usern, clientchar_t *machine, afs_uint32 flags);
-extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, clientchar_t *usern);
+extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, clientchar_t *usern);
extern void smb_ReleaseUsername(smb_username_t *unp);
extern DWORD smb_monitorReqs;
/* used for getting a challenge for SMB auth */
-typedef struct _MSV1_0_LM20_CHALLENGE_REQUEST {
+typedef struct _MSV1_0_LM20_CHALLENGE_REQUEST {
MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
} MSV1_0_LM20_CHALLENGE_REQUEST, *PMSV1_0_LM20_CHALLENGE_REQUEST;
-typedef struct _MSV1_0_LM20_CHALLENGE_RESPONSE {
- MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
+typedef struct _MSV1_0_LM20_CHALLENGE_RESPONSE {
+ MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
UCHAR ChallengeToClient[MSV1_0_CHALLENGE_LENGTH];
} MSV1_0_LM20_CHALLENGE_RESPONSE, *PMSV1_0_LM20_CHALLENGE_RESPONSE;
/**/
extern void smb_FormatResponsePacket(smb_vc_t *vcp, smb_packet_t *inp,
smb_packet_t *op);
-extern char *myCrt_Dispatch(int i);
+extern char *myCrt_Dispatch(int i);
extern char *myCrt_2Dispatch(int i);
MSV1_0_PROTOCOL_MESSAGE_TYPE MessageType;
ULONG ProcessOptions;
BOOLEAN DisableOptions;
-} MSV1_0_SETPROCESSOPTION_REQUEST, *PMSV1_0_SETPROCESSOPTION_REQUEST;
+} MSV1_0_SETPROCESSOPTION_REQUEST, *PMSV1_0_SETPROCESSOPTION_REQUEST;
#endif
#endif /* whole file */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct {
unsigned long eaSize;
} QFeaInfo;
- struct {
+ struct {
unsigned long fileNameLength;
unsigned char fileName[512];
} QFfileNameInfo;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* pathname associated with the Tree ID */
clientchar_t *tidPathp;
-
+
/* prefix for subst drives */
cm_space_t *prefix;
smb_ParseIoctlParent(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
cm_scache_t **scpp, clientchar_t *leafp);
-extern afs_int32
+extern afs_int32
smb_IoctlSetToken(struct smb_ioctl *ioctlp, struct cm_user *userp, afs_uint32 flags);
extern afs_int32
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
RegDupKeyAlt(const char *sourceKey,
const char *targetKey);
-extern int
+extern int
IsWow64(void);
#ifdef __cplusplus
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef _ADMIN_INFO_DLG_H_
#define _ADMIN_INFO_DLG_H_
-// Each option includes the ones before it.
+// Each option includes the ones before it.
enum GET_ADMIN_INFO_OPTIONS { GAIO_LOGIN_ONLY, GAIO_GET_SCS };
BOOL GetAdminInfo(HWND hParent, GET_ADMIN_INFO_OPTIONS eOptions);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define CS_NULL 0 // NULL state
#define CS_DONT_CONFIGURE 1 // Do not perform the configuration step
#define CS_CONFIGURE 2 // Perform the configuration step
-#define CS_ALREADY_CONFIGURED 3 // The step has already been performed, so we don't
+#define CS_ALREADY_CONFIGURED 3 // The step has already been performed, so we don't
// need to do it.
#define CS_UNCONFIGURE 4 // Unconfigure the step
#define CS_DISABLED 32 // The step cannot be performed because it is dependent
- // on some other step that is not to be performed and
+ // on some other step that is not to be performed and
// has not already been performed.
// I know I could have used an enum for this, but then tacking on the CS_DISABLED
*/
struct CFG_DATA {
BOOL bWizard;
-
+
CONFIG_STATE configFS; // File server
CONFIG_STATE configDB; // Database server
CONFIG_STATE configBak; // Backup server
BOOL bRootAfsExists;
BOOL bRootCellExists;
-
- // If we cannot determine if the root volumes exist, then this
+
+ // If we cannot determine if the root volumes exist, then this
// variable will be FALSE.
BOOL bRootVolumesExistanceKnown;
-
+
BOOL bRootAfsReplicated;
BOOL bRootCellReplicated;
BOOL bRootVolumesReplicationKnown;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
BOOL IsStepEnabled(const CONFIG_STATE& step);
void EnableStep(CONFIG_STATE& step, BOOL bEnable = TRUE);
-BOOL ShouldConfig(const CONFIG_STATE& state);
+BOOL ShouldConfig(const CONFIG_STATE& state);
BOOL DontConfig(const CONFIG_STATE& state);
void ToggleConfig(CONFIG_STATE& state);
BOOL ConfiguredOrConfiguring(const CONFIG_STATE& step);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
LOGFILE();
~LOGFILE();
- BOOL Open( const char *pszLogFilePath,
+ BOOL Open( const char *pszLogFilePath,
LOGFILE_OPEN_MODE eOpenMode = OM_OVERWRITE,
LOGFILE_TIMESTAMP_MODE eTimeStampMode = TSM_EACH_ENTRY
);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
#define IDS_NEXT 0
-#define IDS_FINISH 1
-#define IDS_HELP_TITLE 2
-#define IDS_HELP_DESC 3
-#define IDS_CANCEL_DESC 4
-#define IDS_PARTITION_ALREADY_CREATED 5
-#define IDS_NOT_A_FS_SERVER 6
-#define IDS_ROOT_AFS_ALREADY_EXISTS 7
-#define IDS_NO_PARTITION_EXISTS 8
-#define IDS_ALREADY_REPLICATED 9
+#define IDS_FINISH 1
+#define IDS_HELP_TITLE 2
+#define IDS_HELP_DESC 3
+#define IDS_CANCEL_DESC 4
+#define IDS_PARTITION_ALREADY_CREATED 5
+#define IDS_NOT_A_FS_SERVER 6
+#define IDS_ROOT_AFS_ALREADY_EXISTS 7
+#define IDS_NO_PARTITION_EXISTS 8
+#define IDS_ALREADY_REPLICATED 9
#define IDS_ROOT_AFS_DOESNT_EXIST 10
#define IDS_ALREADY_CONFIGURED 11
#define IDS_NOTHING_TO_CONFIGURE 12
#define IDS_EXIT 13
-
+
#define IDS_START_FS_STEP 16
#define IDS_CANCEL_CONFIG_MSG 17
#define IDS_WIZARD_APP_TITLE 18
#define IDS_PARTITIONS_PAGE_TITLE 76
#define IDS_CONFIGURE 77
#define IDS_DB_AND_BK_STEP_DESC 78
-
+
#define IDS_PARTITION_STEP 80
#define IDS_CONFIG_COMMON_FUNCS 81
#define IDS_START_DB_STEP 82
#define IDS_SET_SERVER_LICENSE_STEP 94
#define IDS_DEFINE_CELL_NAME_STEP 95
-#define IDS_DEFINE_CELL_MEMBERSHIP_STEP 96
-#define IDS_START_BOS_SERVER_STEP 97
-#define IDS_START_AUTH_SERVER_STEP 98
-#define IDS_CREATE_PRINCIPAL_AND_KEY_STEP 99
+#define IDS_DEFINE_CELL_MEMBERSHIP_STEP 96
+#define IDS_START_BOS_SERVER_STEP 97
+#define IDS_START_AUTH_SERVER_STEP 98
+#define IDS_CREATE_PRINCIPAL_AND_KEY_STEP 99
#define IDS_START_DB_AND_BK_STEP 100
#define IDS_CREATE_ADMIN_PRINCIPAL_STEP 101
#define IDS_START_CLIENT_STEP 102
#define IDS_BK_WILL_RUN 205
#define IDS_BK_WILL_STOP 206
#define IDS_SCS_WILL_RUN 207
-
+
#define IDS_SCS_WILL_STOP 208
#define IDS_ERROR_DRIVE_ALREADY_HAS_AFS 209
#define IDS_VOLUME_HAS_NO_NAME 210
#define IDC_SALVAGE_STATUS 1200
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
inline void MakeBold(HWND hDlg, UINT uiCtrlID) { MakeBold(GetDlgItem(hDlg, uiCtrlID)); }
int MsgBox(HWND hParent, UINT uiTextID, UINT uiCaptionID, UINT uiType);
-
+
#endif // _TOOLBOX_H_
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define _VALIDATION_H_
-enum VALIDATION_TYPE {
- VALID_AFS_PARTITION_NAME,
+enum VALIDATION_TYPE {
+ VALID_AFS_PARTITION_NAME,
VALID_AFS_CELL_NAME,
VALID_AFS_PASSWORD,
VALID_AFS_UID,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDS_SERVICES_IN_CELL 762
#define IDS_SERVICE_STARTDATE 763
#define IDS_SERVICE_STOPDATE 764
-
+
#define IDC_CELL 1000
#define IDC_SERVERS 1001
#define IDC_TABS 1002
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
#define IDS_APP_TITLE 0
-#define IDS_USRCOL_NAME 1
-#define IDS_GRPCOL_NAME 2
-#define IDS_BADCREDS_DESC 3
-#define IDS_TAB_USERS 4
-#define IDS_TAB_GROUPS 5
-#define IDS_CELL_NONE 6
-#define IDS_CRED_NONE 7
-#define IDS_CRED_EXP 8
-#define IDS_CRED_OK 9
+#define IDS_USRCOL_NAME 1
+#define IDS_GRPCOL_NAME 2
+#define IDS_BADCREDS_DESC 3
+#define IDS_TAB_USERS 4
+#define IDS_TAB_GROUPS 5
+#define IDS_CELL_NONE 6
+#define IDS_CRED_NONE 7
+#define IDS_CRED_EXP 8
+#define IDS_CRED_OK 9
#define IDS_USERS_ALL 10
#define IDS_USERS_PATTERN 11
#define IDS_GROUPS_ALL 12
#define IDS_GROUPS_PATTERN 13
#define IDS_QUERYING_LONG 14
-
+
#define IDS_ACTION_DESC_NONE 16
#define IDS_ACTION_DESC_ONE 17
#define IDS_ACTION_DESC_MULT 18
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright (C) 1989,2004 by the Massachusetts Institute of Technology
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
#define IDS_TITLE_NT 0
-#define IDS_TITLE_95 1
-#define IDS_STATE_STOPPED 2
-#define IDS_STATE_RUNNING 3
-#define IDS_STATE_STARTING 4
-#define IDS_STATE_STOPPING 5
-#define IDS_STATE_UNKNOWN 6
-#define IDS_SERVICE_FAIL_START 7
-#define IDS_SERVICE_FAIL_STOP 8
+#define IDS_TITLE_95 1
+#define IDS_STATE_STOPPED 2
+#define IDS_STATE_RUNNING 3
+#define IDS_STATE_STARTING 4
+#define IDS_STATE_STOPPING 5
+#define IDS_STATE_UNKNOWN 6
+#define IDS_SERVICE_FAIL_START 7
+#define IDS_SERVICE_FAIL_STOP 8
#define IDS_WARN_STOPPED 9
#define IDS_WARN_ADMIN 10
#define IDS_CELL_UNKNOWN 11
#define IDS_GATEWAY_UNKNOWN 12
-
+
#define IDS_BADLOOKUP_DESC 16
#define IDS_NEWSUB_DESC 17
#define IDS_BADSUB_DESC 18
#define IDS_TITLE_ERROR_95 24
#define IDS_SHRINKCACHE 25
#define IDS_BADCELL_DESC_CC 26
-
+
#define IDS_STOP_DESC 32
#define IDS_PREFCOL_SERVER 33
#define IDS_PREFCOL_RANK 34
#define IDS_SVRCOL_COMMENT 43
#define IDS_TIP_DRIVES 44
#define IDS_MAP_LETTER 45
-
+
#define IDS_DRIVE_MAP 48
#define IDS_ERROR_MAP 49
#define IDS_ERROR_MAP_DESC 50
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDI_CCENTER 104
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 105
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright (c) 2003 SkyRope, LLC
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
+ *
+ * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
+ *
+ * - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
- * - Neither the name of Skyrope, LLC nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
+ * - Neither the name of Skyrope, LLC nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
* specific prior written permission from Skyrope, LLC.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
BOOL m_bAdd;
BOOL m_bSave;
-
+
void CheckEnableOk();
-
+
// Construction
public:
CAddSubmtDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
class CDownServersDlg : public CDialog
{
CStringArray m_ServerNames;
-
+
// Construction
public:
CDownServersDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define GET_TOKENS_HELP_ID 17
#define DISCARD_TOKENS_HELP_ID 18
#define SET_AFS_ACL_HELP_ID 19
-#define ADD_ACL_ENTRY_HELP_ID 20
+#define ADD_ACL_ENTRY_HELP_ID 20
#define COPY_ACL_HELP_ID 21
#define VOLUME_INFO_HELP_ID 27
#define PARTITION_INFO_HELP_ID 28
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
class CKlogDlg : public CDialog
{
void CheckEnableOk();
-
+
// Construction
public:
CKlogDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
BOOL m_bMade;
void CheckEnableOk();
-
+
// Construction
public:
CMakeMountPointDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
class CMakeSymbolicLinkDlg : public CDialog
{
void CheckEnableOk();
-
+
// Construction
public:
CMakeSymbolicLinkDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
class CMountPointsDlg : public CDialog
{
CStringArray m_MountPoints;
-
+
// Construction
public:
CMountPointsDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef _MSGS_H_
#define _MSGS_H_
-#include "resource.h"
+#include "resource.h"
UINT ShowMessageBox (UINT Id, UINT Button = MB_OK, UINT Help = 0, ...);
CString GetMessageString(UINT Id,...);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
LONG m_nSize;
LONG m_nFree;
-
+
// Construction
public:
CPartitionInfoDlg(CWnd* pParent = NULL); // standard constructor
//
// Copyright 2000, International Business Machines Corporation and others.
// All Rights Reserved.
-//
+//
// This software has been released under the terms of the IBM Public
// License. For details, see the LICENSE file in the top-level source
// directory or online at http://www.openafs.org/dl/license10.html
//
#define ID_ACL_CLEAN 0
-#define ID_ACL_COPY 1
-#define ID_ACL_LIST 2
-#define ID_ACL_SET 3
-#define ID_VOLUME_CHECK 4
-#define ID_VOLUME_DISKFREE 5
-#define ID_VOLUME_EXAMINE 6
-#define ID_VOLUME_FLUSH 7
-#define ID_VOLUME_QUOTA_BRIEF 8
-#define ID_VOLUME_QUOTA_FULL 9
+#define ID_ACL_COPY 1
+#define ID_ACL_LIST 2
+#define ID_ACL_SET 3
+#define ID_VOLUME_CHECK 4
+#define ID_VOLUME_DISKFREE 5
+#define ID_VOLUME_EXAMINE 6
+#define ID_VOLUME_FLUSH 7
+#define ID_VOLUME_QUOTA_BRIEF 8
+#define ID_VOLUME_QUOTA_FULL 9
#define ID_VOLUME_QUOTA_SET 10
#define ID_VOLUME_SET 11
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 163
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_DISPATCH
DECLARE_DISPATCH_MAP()
-
+
DECLARE_OLECREATE(CShellExt)
-
+
// IFileViewer interface
BEGIN_INTERFACE_PART(MenuExt, IContextMenu)
STDMETHOD(QueryContextMenu)( HMENU hmenu,UINT indexMenu,UINT idCmdFirst,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
class CSymlinksDlg : public CDialog
{
CStringArray m_Symlinks;
-
+
// Construction
public:
CSymlinksDlg(CWnd* pParent = NULL); // standard constructor
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright (C) 1998, 1989 Transarc Corporation - All rights reserved
*
* (C) COPYRIGHT IBM CORPORATION 1987, 1988
Abstract:
- Include file for sample Large Integer Arithmetic routines.
- This file includes all of the prototypes for the routines found in
+ Include file for sample Large Integer Arithmetic routines.
+ This file includes all of the prototypes for the routines found in
largeint.lib. For complete descriptions of these functions, see the
- largeint.s source file for MIPS, or the divlarge.c and largeint.asm
- source files for x86.
+ largeint.s source file for MIPS, or the divlarge.c and largeint.asm
+ source files for x86.
Revision History:
-/*
+/*
* Copyright (C) 1998, 1989 Transarc Corporation - All rights reserved
*
* (C) COPYRIGHT IBM CORPORATION 1987, 1988
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
LARGE_INTEGER LargeIntegerSubtract(LARGE_INTEGER a, LARGE_INTEGER b);
LARGE_INTEGER ExtendedLargeIntegerDivide(LARGE_INTEGER a, unsigned long b, unsigned long *remainder);
LARGE_INTEGER LargeIntegerDivide(LARGE_INTEGER a, LARGE_INTEGER b, LARGE_INTEGER *remainder);
-LARGE_INTEGER ConvertLongToLargeInteger(unsigned long a);
+LARGE_INTEGER ConvertLongToLargeInteger(unsigned long a);
#define LargeIntegerGreaterThan(a, b) \
((a).HighPart > (b).HighPart || \
((a).HighPart == (b).HighPart && (a).LowPart > (b).LowPart))
#define LargeIntegerGreaterThanOrEqualTo(a, b) \
((a).HighPart > (b).HighPart || \
((a).HighPart == (b).HighPart && (a).LowPart >= (b).LowPart))
-
+
#define LargeIntegerLessThan(a, b) \
((a).HighPart < (b).HighPart || \
((a).HighPart == (b).HighPart && (a).LowPart < (b).LowPart))
#define LargeIntegerEqualTo(a, b) \
((a).HighPart == (b).HighPart && (a).LowPart == (b).LowPart)
-
+
#define LargeIntegerGreaterThanZero(a) \
((a).HighPart > 0 || ((a).HighPart == 0 && (a).LowPart != 0))
#define LargeIntegerGreaterOrEqualToZero(a) ((a).HighPart >= 0)
-
+
#define LargeIntegerLessThanZero(a) ((a).HighPart < 0)
#define LargeIntegerNotEqualToZero(a) ((a).HighPart || (a).LowPart)
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
} osi_rwlock_t;
-/*
- * a lock reference is a queue object that maintains a reference to a
- * mutex or read/write lock object. Its intended purpose is for
+/*
+ * a lock reference is a queue object that maintains a reference to a
+ * mutex or read/write lock object. Its intended purpose is for
* maintaining lists of lock objects on a per thread basis.
*/
typedef struct osi_lock_ref {
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright (C) 1998, 1989 Transarc Corporation - All rights reserved
*
* (C) COPYRIGHT IBM CORPORATION 1987, 1988
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
extern void osi_QRemove(osi_queue_t **headpp, osi_queue_t *eltp);
-/* remove an element from a queue with both head and tail pointers;
+/* remove an element from a queue with both head and tail pointers;
* takes address of head and tail lists, and element to remove as parameters.
*/
extern void osi_QRemoveHT(osi_queue_t **headpp, osi_queue_t **tailpp, osi_queue_t *eltp);
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* plugin callback procedure */
-khm_int32 KHMAPI
+khm_int32 KHMAPI
afs_plugin_cb(khm_int32 msg_type,
khm_int32 msg_subtype,
khm_ui_4 uparam,
BOOL
afs_is_running(void);
-int
+int
afs_princ_to_string(struct ktc_principal * p, wchar_t * buf, size_t cbbuf);
-int
+int
afs_list_tokens(void);
khm_handle
afs_find_token(khm_handle credset, wchar_t * cell);
-int
+int
afs_list_tokens_internal(void);
-int
+int
afs_klog(khm_handle identity,
char *service,
char *cell,
int
afs_unlog_cred(khm_handle cred);
-DWORD
-GetServiceStatus(LPSTR lpszMachineName,
- LPSTR lpszServiceName,
+DWORD
+GetServiceStatus(LPSTR lpszMachineName,
+ LPSTR lpszServiceName,
DWORD *lpdwCurrentState,
DWORD *lpdwWaitHint);
-DWORD
-ServiceControl(LPSTR lpszMachineName,
+DWORD
+ServiceControl(LPSTR lpszMachineName,
LPSTR lpszServiceName,
DWORD dwNewState);
#define AFS_DLG_ROW_ALLOC 4
-INT_PTR CALLBACK
+INT_PTR CALLBACK
afs_dlg_proc(HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam);
-void
+void
afs_dlg_update_rows(HWND hwnd, afs_dlg_data * d);
-void
+void
afs_cred_flush_rows(afs_cred_list * l);
-void
+void
afs_cred_free_rows(afs_cred_list * l);
-void
+void
afs_cred_assert_rows(afs_cred_list * l, int n);
-void
+void
afs_cred_delete_row(afs_cred_list * l, int i);
-afs_cred_row *
+afs_cred_row *
afs_cred_get_new_row(afs_cred_list * l);
khm_int32 KHMAPI
afs_cred_get_context_creds(afs_cred_list *l,
khui_action_context * ctx);
-void
-afs_cred_get_identity_creds(afs_cred_list * l,
+void
+afs_cred_get_identity_creds(afs_cred_list * l,
khm_handle ident,
khm_boolean * enabled);
afs_cred_write_ident_data(afs_dlg_data * d);
khm_int32
-afs_msg_newcred(khm_int32 msg_subtype,
- khm_ui_4 uparam,
+afs_msg_newcred(khm_int32 msg_subtype,
+ khm_ui_4 uparam,
void * vparam);
#endif
#ifndef __AFSPLUGIN_EXT_H
#define __AFSPLUGIN_EXT_H
-/*! \defgroup afs_ext OpenAFS Plugin extensions
+/*! \defgroup afs_ext OpenAFS Plugin extensions
This section documents messages and data structures used by AFS
extension plugins. These are plugins which augment the behavior
#define AFS_TOKENNAME_KRB524 L"Kerberos524"
#define AFS_TOKENNAME_KRB4 L"Kerberos4"
-/*! \brief An AFS token acquisition method identifier
+/*! \brief An AFS token acquisition method identifier
This takes on a value from ::afs_token_method or a token
acquisition method identifier assigned to an extension plugin.
#include<khdefs.h>
#include<tlhelp32.h>
-#if defined(_WIN32_WINNT)
+#if defined(_WIN32_WINNT)
# if (_WIN32_WINNT < 0x0501)
# define AFS_WIN32_WINNT _WIN32_WINNT
# undef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
# endif
-#else
+#else
# define _WIN32_WINNT 0x0501
#endif
#include<krb5.h>
#ifndef NO_KRB5
-int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
+int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName,
int FreeContextFlag, krb5_context *ctx,
krb5_ccache *cache);
void * buffer, khm_size * pcbbuf);
khm_int32 KHMAPI
-khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
- khm_handle ident,
+khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc,
+ khm_handle ident,
krb5_timestamp * pexpiration);
#endif /* NO_KRB5 */
#define ID_RELEASENOTES 40038
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 118
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct rx_queue wait_queue;
HANDLE event;
} cond_waiters_t;
-
+
typedef struct {
CRITICAL_SECTION cs;
struct rx_queue waiting_threads;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define va_atime va_access_time
#define va_mtime va_modify_time
#define va_ctime va_change_time
-#define va_bytes va_total_alloc
+#define va_bytes va_total_alloc
#define va_blocksize va_iosize
#define va_nodeid va_fileid
extern u_int32_t afs_darwin_realmodes;
extern u_int32_t afs_darwin_fsevents;
-/*
+/*
* Time related macros
*/
#ifdef AFS_DARWIN80_ENV
#define osi_curproc() current_proc()
/* FIXME */
-#define osi_curcred() &afs_osi_cred
+#define osi_curcred() &afs_osi_cred
#ifdef AFS_DARWIN80_ENV
uio_t afsio_darwin_partialcopy(uio_t auio, int size);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* osi_vnodeops.c */
extern int afs_darwin_getnewvnode(struct vcache *avc, int recycle);
-extern int afs_darwin_finalizevnode(struct vcache *avc, struct vnode *parent,
+extern int afs_darwin_finalizevnode(struct vcache *avc, struct vnode *parent,
struct componentname *cnp, int isroot,
int locked);
#endif /* _OSI_PROTO_H_ */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <sys/priv.h>
#endif
-/*
+/*
* Time related macros
*/
#define osi_Time() time_second
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define getppid() (afs_uint32)p_ppid(u.u_procp)
/*
- * Global lock support.
+ * Global lock support.
*
* HP uses global mutex to protect afs land
*/
#define USERPRI NET_SPLX(splvar)
#if !defined(AFS_HPUX110_ENV)
-/*
+/*
* On HP, the global lock is an alpha semaphore, hence it is automatically
* released and reacquired aroubd a sleep() and wakeup().
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* CAUTION -- The ISAFS_(RX)?GLOCK macros are not safe to use when the lock is
* not held if the test may be made at interrupt level as the code may
* appear to be running as the process that is (or last was) running at
- * non-interrupt level. Worse yet, the interrupt may occur just as the
+ * non-interrupt level. Worse yet, the interrupt may occur just as the
* process is exiting, in which case, the pid may change from the start
* of the interrupt to the end, since the u area has been changed. So,
* at interrupt level, I'm using the base of the current interrupt stack.
- * Note that afs_osinet.c also modifies afs_global_owner for osi_Sleep and
+ * Note that afs_osinet.c also modifies afs_global_owner for osi_Sleep and
* afs_osi_Wakeup. Changes made here should be reflected there as well.
* NOTE - As of 6.2, we can no longer use mutexes in interrupts, so the above
* concern no longer exists.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
unsigned int v_bufgen; /* buf list generation number */
mutex_t v_buf_lock; /* mutex for buffer tree */
- vnode_pcache_t v_pc; /* Page cache structure.
+ vnode_pcache_t v_pc; /* Page cache structure.
* per vnode. Refer to
- * vnode_pcache.h
+ * vnode_pcache.h
* for details.
*/
#ifdef VNODE_TRACING
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define afs_hz HZ
#include "h/sched.h"
#if defined(HAVE_LINUX_CURRENT_KERNEL_TIME)
-static inline time_t osi_Time(void) {
+static inline time_t osi_Time(void) {
struct timespec xtime;
xtime = current_kernel_time();
return xtime.tv_sec;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define afs_hz HZ
#include "h/sched.h"
#if defined(HAVE_LINUX_CURRENT_KERNEL_TIME)
-static inline time_t osi_Time(void) {
+static inline time_t osi_Time(void) {
struct timespec xtime;
xtime = current_kernel_time();
return xtime.tv_sec;
#define NEED_IOCTL32
#endif
-/* page offset is obtained and stored here during module initialization
+/* page offset is obtained and stored here during module initialization
* We need a variable to do this because, the PAGE_OFFSET macro defined in
* include/asm/page.h can change from kernel to kernel and we cannot use
* the hardcoded version.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
typedef struct cred afs_ucred_t;
typedef struct proc afs_proc_t;
-/*
+/*
* Time related macros
*/
#define afs_hz hz
#endif
/*
- * Global lock support.
+ * Global lock support.
*/
#include <sys/mutex.h>
extern kmutex_t afs_global_lock;
#if defined(AFS_SUN56_ENV)
/*
-** Macro returns 1 if file is larger than 2GB; else returns 0
+** Macro returns 1 if file is larger than 2GB; else returns 0
*/
#undef AfsLargeFileUio
#define AfsLargeFileUio(uio) ( (uio)->_uio_offset._p._u ? 1 : 0 )
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFS_KALLOC(A) afs_osi_Alloc(A)
-/*
+/*
* Time related macros
*/
#define afs_hz HZ
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct usr_vnodeops {
int (*vn_open) (struct vcache **, afs_int32, afs_ucred_t *);
int (*vn_close) (struct vcache *, afs_int32, afs_ucred_t *);
- int (*vn_rdwr) (struct usr_vnode *avc, struct usr_uio *uio,
+ int (*vn_rdwr) (struct usr_vnode *avc, struct usr_uio *uio,
int rw, int io, struct usr_ucred *cred);
int (*vn_ioctl) (void);
int (*vn_select) (void);
int (*vn_getattr) (struct vcache *avc, struct vattr *, afs_ucred_t *);
int (*vn_setattr) (struct vcache *avc, struct vattr *, afs_ucred_t *);
int (*vn_access) (struct vcache *avc, afs_int32, afs_ucred_t *);
- int (*vn_lookup) (struct vcache *adp, char *, struct vcache **,
+ int (*vn_lookup) (struct vcache *adp, char *, struct vcache **,
afs_ucred_t *, int);
- int (*vn_create) (struct vcache *adp, char *, struct vattr *,
+ int (*vn_create) (struct vcache *adp, char *, struct vattr *,
enum vcexcl, int, struct vcache **, afs_ucred_t *);
int (*vn_remove) (struct vcache *adp, char *, afs_ucred_t *);
- int (*vn_link) (struct vcache *avc, struct vcache *adp, char *,
+ int (*vn_link) (struct vcache *avc, struct vcache *adp, char *,
afs_ucred_t *);
int (*vn_rename) (struct vcache *aodp, char *, struct vcache *, char *,
afs_ucred_t *);
- int (*vn_mkdir) (struct vcache *adp, char *, struct vattr *,
+ int (*vn_mkdir) (struct vcache *adp, char *, struct vattr *,
struct vcache **, afs_ucred_t *);
int (*vn_rmdir) (struct vcache *adp, char *, afs_ucred_t *);
int (*vn_readdir) (struct vcache *avc, struct uio *, afs_ucred_t *);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* The actual number of bytes in the SmallFid, not the sizeof struct. */
#define SIZEOF_SMALLFID 10
-/* Queues
+/* Queues
* ------
*
* Circular queues, implemented with pointers. Structures may contain as many
#define afs_PutServer(servp, locktype)
-/* structs for some pioctls - these are (or should be)
+/* structs for some pioctls - these are (or should be)
* also in venus.h
*/
struct spref {
and should not be overridden by the file's name */
/* Flag values used by the Transition routines */
-#define TRANSChangeDesiredBit 0x1 /* The Transition routine should set or
+#define TRANSChangeDesiredBit 0x1 /* The Transition routine should set or
* reset the FCSDesireBypass bit */
#define TRANSVcacheIsLocked 0x2 /* The Transition routine does not need to
* lock vcache (it's already locked) */
#define TRANSSetManualBit 0x4 /* The Transition routine should set FCSManuallySet so that
- * filename checking does not override pioctl requests */
+ * filename checking does not override pioctl requests */
#endif /* AFS_CACHE_BYPASS */
#define CPSIZE 2
/*! The old parent FID for renamed vnodes */
struct afs_vnuniq oldParent;
};
-
+
/* INVARIANTs: (vlruq.next != NULL) == (vlruq.prev != NULL)
* nextfree => !vlruq.next && ! vlruq.prev
* !(avc->nextfree) && !avc->vlruq.next => (FreeVCList == avc->nextfree)
off_t next_seq_blk_offset; /* accounted in blocks for Solaris & IRIX */
#endif
#endif
-
+
#if defined(AFS_SUN5_ENV)
afs_uint32 vstates; /* vstate bits */
#endif /* defined(AFS_SUN5_ENV) */
/* CacheItems file has a header of type struct afs_fheader
* (keep aligned properly). Since we already have sgi_62 clients running
* with a 32 bit inode, a change is required to the header so that
- * they can distinguish the old 32 bit inode CacheItems file and zap it
+ * they can distinguish the old 32 bit inode CacheItems file and zap it
* instead of using it.
*/
struct afs_fheader {
} while(0)
/* FakeOpen and Fake Close used to be real subroutines. They're only used in
- * sun_subr and afs_vnodeops, and they're very frequently called, so I made
+ * sun_subr and afs_vnodeops, and they're very frequently called, so I made
* them into macros. They do:
* FakeOpen: fake the file being open for writing. avc->lock must be held
* in write mode. Having the file open for writing is like having a DFS
- * write-token: you're known to have the best version of the data around,
+ * write-token: you're known to have the best version of the data around,
* and so the CM won't let it be overwritten by random server info.
* FakeClose: undo the effects of FakeOpen, noting that we want to ensure
* that a real close eventually gets done. We use CCore to achieve this if
#define FVHash(acell,avol) (((avol)+(acell)) & (NFENTRIES-1))
/* Performance hack - we could replace VerifyVCache2 with the appropriate
- * GetVCache incantation, and could eliminate even this code from afs_UFSRead
+ * GetVCache incantation, and could eliminate even this code from afs_UFSRead
* by making intentionally invalidating quick.stamp in the various callbacks
* expiration/breaking code */
#ifdef AFS_DARWIN_ENV
#define refpanic(foo) if (afs_norefpanic) \
{ printf( foo ); afs_norefpanic++;} else osi_Panic( foo )
-/*
+/*
** these are defined in the AIX source code sys/fs_locks.h but are not
** defined anywhere in the /usr/include directory
*/
#endif
/* declare something so that prototypes don't flip out */
-/* appears struct buf stuff is only actually passed around as a pointer,
+/* appears struct buf stuff is only actually passed around as a pointer,
except with libuafs, in which case it is actually defined */
struct buf;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* 0 if the vldb record for a specific volume is different from what
* we have cached -- perhaps the volume has moved.
* 1 if the vldb record is the same
- * 2 if we can't tell if it's the same or not.
+ * 2 if we can't tell if it's the same or not.
*
* If 0, the caller will probably start over at the beginning of our
* list of servers for this volume and try to find one that is up. If
* areq : The request record associated with this operation.
* afid : The FID of the file involved in the action. This argument
* may be null if none was involved.
- * tsp : pointer to a server struct for the server we wish to
- * blacklist.
+ * tsp : pointer to a server struct for the server we wish to
+ * blacklist.
*
* Returns:
* Non-zero value if further servers are available to try,
* As advertised.
*
* NOTE:
- * The afs_Conn* routines use the list of invalidated servers to
+ * The afs_Conn* routines use the list of invalidated servers to
* avoid reusing a server marked as invalid for this request.
*------------------------------------------------------------------------*/
-static afs_int32
-afs_BlackListOnce(struct vrequest *areq, struct VenusFid *afid,
+static afs_int32
+afs_BlackListOnce(struct vrequest *areq, struct VenusFid *afid,
struct server *tsp)
{
struct volume *tvp;
areq->skipserver[i] = 1;
}
if (tvp->serverHost[i] &&
- (tvp->serverHost[i]->addr->sa_flags &
+ (tvp->serverHost[i]->addr->sa_flags &
SRVR_ISDOWN)) {
areq->skipserver[i] = 1;
}
struct afs_stats_RPCErrors *aerrP;
afs_int32 markeddown;
afs_uint32 address;
-
+
if (AFS_IS_DISCONNECTED && !AFS_IN_SYNC) {
/* On reconnection, act as connected. XXX: for now.... */
/* SXW - This may get very tired after a while. We should try and
}
return 0;
}
-
+
AFS_STATCNT(afs_Analyze);
afs_Trace4(afs_iclSetp, CM_TRACE_ANALYZE, ICL_TYPE_INT32, op,
ICL_TYPE_POINTER, aconn, ICL_TYPE_INT32, acode, ICL_TYPE_LONG,
}
/* If network troubles, mark server as having bogued out again. */
- /* VRESTARTING is < 0 because of backward compatibility issues
+ /* VRESTARTING is < 0 because of backward compatibility issues
* with 3.4 file servers and older cache managers */
#ifdef AFS_64BIT_CLIENT
if (acode == -455)
if (tvp)
afs_PutVolume(tvp, READ_LOCK);
/* By doing this, we avoid ever marking a server down
- * in an idle timeout case. That's because the server is
+ * in an idle timeout case. That's because the server is
* still responding and may only be letting a single vnode
* time out. We otherwise risk having the server continually
- * be marked down, then up, then down again...
+ * be marked down, then up, then down again...
*/
goto out;
- }
+ }
markeddown = afs_ServerDown(sa);
ForceNewConnections(sa); /**multi homed clients lock:afs_xsrvAddr? */
if (aerrP)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_rwlock_t afs_xaxs;
/* takes an address of an access cache & uid, returns ptr */
-/* PRECONDITION: first field has been checked and doesn't match!
+/* PRECONDITION: first field has been checked and doesn't match!
* INVARIANT: isparent(i,j) ^ isparent(j,i) (ie, they switch around)
*/
struct axscache *
}
-/*
+/*
* Takes an entire list of access cache structs and prepends them, lock, stock,
* and barrel, to the front of the freelist.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Access cache -
* The way to use this package is:
- * If the cache pointer is not NULL, call afs_findAxs, and if it's not
+ * If the cache pointer is not NULL, call afs_findAxs, and if it's not
* NULL, use its access field
- * Otherwise,
+ * Otherwise,
* axs_Alloc a new one,
* fill it in,
* insert it at the head of the list.
*
- * Of course, don't forget to axs_Free them occasionally,
+ * Of course, don't forget to axs_Free them occasionally,
*
* Alloc and Free need a lock on the freelist, the other guys are safe if the
* parent structure is locked, but probably REQUIRE the parent to be locked...
struct axscache *next;
};
-/* DON'T use this with a NULL pointer!
- * the quick check should cover 99.9% of the cases
+/* DON'T use this with a NULL pointer!
+ * the quick check should cover 99.9% of the cases
*/
#define afs_FindAxs(cachep,id) (((cachep)->uid == id) ? (cachep) : afs_SlowFindAxs(&(cachep),(id)))
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "h/param.h"
#include "h/types.h"
#include "h/time.h"
-#if defined(AFS_AIX31_ENV)
+#if defined(AFS_AIX31_ENV)
#include "h/limits.h"
#endif
#if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV)
#define buf_Front(head,parent,p) {(parent)->hashNext = (p)->hashNext; (p)->hashNext= *(head);*(head)=(p);}
/* this apparently-complicated-looking code is simply an example of
- * a little bit of loop unrolling, and is a standard linked-list
+ * a little bit of loop unrolling, and is a standard linked-list
* traversal trick. It saves a few assignments at the the expense
* of larger code size. This could be simplified by better use of
- * macros.
+ * macros.
*/
if ((tb = phTable[pHash(adc->index, page)])) {
if (bufmatch(tb)) {
AFS_STATS(afs_stats_cmperf.bufMisses++);
/* can't find it */
/* The last thing we looked at was either tb or tb2 (or nothing). That
- * is at least the oldest buffer on one particular hash chain, so it's
+ * is at least the oldest buffer on one particular hash chain, so it's
* a pretty good place to start looking for the truly oldest buffer.
*/
tb = afs_newslot(adc, page, (tb ? tb : tb2));
return AFS_BUFFER_PAGESIZE * tp->page + (int)(((char *)ap) - tp->data);
}
-/*!
+/*!
* Zap one dcache entry: destroy one FID's buffers.
*
* 1/1/91 - I've modified the hash function to take the page as well
* as the *fid, so that lookup will be a bit faster. That presents some
* difficulties for Zap, which now has to have some knowledge of the nature
- * of the hash function. Oh well. This should use the list traversal
+ * of the hash function. Oh well. This should use the list traversal
* method of DRead...
*
* \param adc The dcache entry to be zapped.
DFlushBuffer(struct buffer *ab)
{
struct osi_file *tfile;
-
+
tfile = afs_CFileOpen(&ab->inode);
afs_CFileWrite(tfile, ab->page * AFS_BUFFER_PAGESIZE,
ab->data, AFS_BUFFER_PAGESIZE);
}
void
-DFlushDCache(struct dcache *adc)
+DFlushDCache(struct dcache *adc)
{
int i;
struct buffer *tb;
/* it seems safe to do this I/O without having the dcache
* locked, since the only things that will update the data in
* a directory are the buffer package, which holds the relevant
- * tb->lock while doing the write, or afs_GetDCache, which
+ * tb->lock while doing the write, or afs_GetDCache, which
* DZap's the directory while holding the dcache lock.
* It is not possible to lock the dcache or even call
* afs_GetDSlot to map the index to the dcache since the dir
* COPYRIGHT © 2000
* THE REGENTS OF THE UNIVERSITY OF MICHIGAN
* ALL RIGHTS RESERVED
- *
+ *
* Permission is granted to use, copy, create derivative works
* and redistribute this software and such derivative works
* for any purpose, so long as the name of The University of
* University of Michigan is included in any copy of any
* portion of this software, then the disclaimer below must
* also be included.
- *
+ *
* THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
* FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
- * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY O
+ * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY O
* MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
* IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGES.
*/
-
+
/*
* Portions Copyright (c) 2008
* The Linux Box Corporation
* of any kind, either express or implied, including
* without limitation the implied warranties of
* merchantability and fitness for a particular purpose. The
- * Linux Box Corporation shall not be liable for any damages,
- * including special, indirect, incidental, or consequential
- * damages, with respect to any claim arising out of or in
- * connection with the use of the software, even if it has been
+ * Linux Box Corporation shall not be liable for any damages,
+ * including special, indirect, incidental, or consequential
+ * damages, with respect to any claim arising out of or in
+ * connection with the use of the software, even if it has been
* or is hereafter advised of the possibility of such damages.
*/
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afs/afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* statistics */
-#include "afs/nfsclient.h"
+#include "afs/nfsclient.h"
#include "rx/rx_globals.h"
#if defined(AFS_LINUX26_ENV)
if(!var) \
RX_AFS_GLOCK(); \
} while(0)
-
+
#define COND_RE_GUNLOCK(var) \
do { \
if(var) \
if (!avc)
return;
-
+
if (avc->f.states & FCSBypass)
- osi_Panic("afs_TransitionToBypass: illegal transition to bypass--already FCSBypass\n");
-
+ osi_Panic("afs_TransitionToBypass: illegal transition to bypass--already FCSBypass\n");
+
if (aflags & TRANSChangeDesiredBit)
setDesire = 1;
if (aflags & TRANSSetManualBit)
setManual = 1;
-
+
#ifdef AFS_BOZONLOCK_ENV
afs_BozonLock(&avc->pvnLock, avc); /* Since afs_TryToSmush will do a pvn_vptrunc */
#else
AFS_GLOCK();
#endif
ObtainWriteLock(&avc->lock, 925);
-
+
/* If we never cached this, just change state */
if (setDesire && (!(avc->cachingStates & FCSBypass))) {
avc->f.states |= FCSBypass;
#if 0
/* also cg2v, don't dequeue the callback */
- ObtainWriteLock(&afs_xcbhash, 956);
+ ObtainWriteLock(&afs_xcbhash, 956);
afs_DequeueCallback(avc);
ReleaseWriteLock(&afs_xcbhash);
#endif
if (avc->linkData && !(avc->f.states & CCore)) {
afs_osi_Free(avc->linkData, strlen(avc->linkData) + 1);
avc->linkData = NULL;
- }
+ }
avc->cachingStates |= FCSBypass; /* Set the bypass flag */
if(setDesire)
return;
if (!(avc->f.states & FCSBypass))
- osi_Panic("afs_TransitionToCaching: illegal transition to caching--already caching\n");
-
+ osi_Panic("afs_TransitionToCaching: illegal transition to caching--already caching\n");
+
if (aflags & TRANSChangeDesiredBit)
resetDesire = 1;
if (aflags & TRANSSetManualBit)
afs_osi_Free(avc->linkData, strlen(avc->linkData) + 1);
avc->linkData = NULL;
}
-
+
avc->cachingStates &= ~(FCSBypass); /* Reset the bypass flag */
if (resetDesire)
avc->cachingStates &= ~(FCSDesireBypass);
/* no-cache prefetch routine */
static afs_int32
-afs_NoCacheFetchProc(struct rx_call *acall,
- struct vcache *avc,
- uio_t *auio,
+afs_NoCacheFetchProc(struct rx_call *acall,
+ struct vcache *avc,
+ uio_t *auio,
afs_int32 release_pages,
afs_int32 size)
{
ciov = auio->uio_iov;
pp = (struct page*) ciov->iov_base;
iovmax = auio->uio_iovcnt - 1;
- iovno = iovoff = result = 0;
+ iovno = iovoff = result = 0;
do {
COND_GUNLOCK(locked);
unlock_and_release_pages(auio);
goto done;
} else
- length = ntohl(length);
+ length = ntohl(length);
if (length > size) {
result = EIO;
unlock_and_release_pages(auio);
goto done;
}
-
+
/*
* The fetch protocol is extended for the AFS/DFS translator
* to allow multiple blocks of data, each with its own length,
} else {
moredata = 0;
}
-
+
while (length > 0) {
- clen = ciov->iov_len - iovoff;
+ clen = ciov->iov_len - iovoff;
tlen = afs_min(length, clen);
#ifdef AFS_LINUX24_ENV
#ifndef AFS_KMAP_ATOMIC
if(pp)
address = kmap(pp);
- else {
+ else {
/* rx doesn't provide an interface to simply advance
- or consume n bytes. for now, allocate a PAGE_SIZE
- region of memory to receive bytes in the case that
+ or consume n bytes. for now, allocate a PAGE_SIZE
+ region of memory to receive bytes in the case that
there were holes in readpages */
if(page_buffer == NULL)
page_buffer = osi_Alloc(PAGE_SIZE);
COND_GUNLOCK(locked);
code = rx_Read(acall, address, tlen);
COND_RE_GLOCK(locked);
-
+
if (code < 0) {
afs_warn("afs_NoCacheFetchProc: rx_Read error. Return code was %d\n", code);
result = 0;
}
length -= code;
tlen -= code;
-
+
if(tlen > 0) {
iovoff += code;
address += code;
iovno++;
if (iovno > iovmax)
goto done;
-
+
ciov = (auio->uio_iov + iovno);
pp = (struct page*) ciov->iov_base;
iovoff = 0;
}
}
} while (moredata);
-
+
done:
if(page_buffer)
osi_Free(page_buffer, PAGE_SIZE);
/* dispatch a no-cache read request */
afs_int32
-afs_ReadNoCache(struct vcache *avc,
+afs_ReadNoCache(struct vcache *avc,
struct nocache_read_request *bparms,
afs_ucred_t *acred)
{
afs_int32 bcnt;
struct brequest *breq;
struct vrequest *areq;
-
+
/* the reciever will free this */
areq = osi_Alloc(sizeof(struct vrequest));
-
+
if (avc && avc->vc_error) {
code = EIO;
afs_warn("afs_ReadNoCache VCache Error!\n");
goto cleanup;
}
- AFS_GLOCK();
+ AFS_GLOCK();
code = afs_VerifyVCache(avc, areq);
AFS_GUNLOCK();
-
+
if (code) {
code = afs_CheckCode(code, areq, 11); /* failed to get it */
afs_warn("afs_ReadNoCache Failed to verify VCache!\n");
goto cleanup;
}
-
+
bparms->areq = areq;
-
+
/* and queue this one */
bcnt = 1;
AFS_GLOCK();
afs_osi_Wait(10 * bcnt, 0, 0);
}
AFS_GUNLOCK();
-
+
if(!breq) {
code = EBUSY;
goto cleanup;
/* Cannot have static linkage--called from BPrefetch (afs_daemons) */
afs_int32
-afs_PrefetchNoCache(struct vcache *avc,
+afs_PrefetchNoCache(struct vcache *avc,
afs_ucred_t *acred,
struct nocache_read_request *bparms)
{
#ifdef AFS_64BIT_CLIENT
afs_int32 length_hi, bytes, locked;
#endif
-
+
struct afs_conn *tc;
afs_int32 i;
struct rx_call *tcall;
struct AFSFetchStatus OutStatus;
struct AFSCallBack CallBack;
};
- struct tlocal1 *tcallspec;
-
+ struct tlocal1 *tcallspec;
+
auio = bparms->auio;
areq = bparms->areq;
- iovecp = auio->uio_iov;
-
+ iovecp = auio->uio_iov;
+
tcallspec = (struct tlocal1 *) osi_Alloc(sizeof(struct tlocal1));
do {
tc = afs_Conn(&avc->f.fid, areq, SHARED_LOCK /* ignored */);
bytes = rx_Read(tcall, (char *)&length_hi,
sizeof(afs_int32));
COND_RE_GLOCK(locked);
-
+
if (bytes != sizeof(afs_int32)) {
length_hi = 0;
code = rx_Error(tcall);
osi_Free(areq, sizeof(struct vrequest));
osi_Free(tcallspec, sizeof(struct tlocal1));
- osi_Free(iovecp, auio->uio_iovcnt * sizeof(struct iovec));
+ osi_Free(iovecp, auio->uio_iovcnt * sizeof(struct iovec));
osi_Free(bparms, sizeof(struct nocache_read_request));
osi_Free(auio, sizeof(uio_t));
return code;
* COPYRIGHT © 2000
* THE REGENTS OF THE UNIVERSITY OF MICHIGAN
* ALL RIGHTS RESERVED
- *
+ *
* Permission is granted to use, copy, create derivative works
* and redistribute this software and such derivative works
* for any purpose, so long as the name of The University of
* University of Michigan is included in any copy of any
* portion of this software, then the disclaimer below must
* also be included.
- *
+ *
* THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
* FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
- * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY O
+ * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY O
* MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
* IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGES.
*/
-
+
/*
* Portions Copyright (c) 2008
* The Linux Box Corporation
* of any kind, either express or implied, including
* without limitation the implied warranties of
* merchantability and fitness for a particular purpose. The
- * Linux Box Corporation shall not be liable for any damages,
- * including special, indirect, incidental, or consequential
- * damages, with respect to any claim arising out of or in
- * connection with the use of the software, even if it has been
+ * Linux Box Corporation shall not be liable for any damages,
+ * including special, indirect, incidental, or consequential
+ * damages, with respect to any claim arising out of or in
+ * connection with the use of the software, even if it has been
* or is hereafter advised of the possibility of such damages.
*/
/* dispatch a no-cache read request */
afs_int32
-afs_ReadNoCache(struct vcache *avc, struct nocache_read_request *bparms,
+afs_ReadNoCache(struct vcache *avc, struct nocache_read_request *bparms,
afs_ucred_t *acred);
/* no-cache prefetch routine */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
int code;
DECLARE_COMPLETION(c);
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX26_ENV)
#if defined(INIT_WORK_HAS_DATA)
struct work_struct tq;
#endif
case 2:
afs_tpct2 = parm3;
break;
- }
+ }
} else if (parm == AFSOP_ADDCELL) {
/* add a cell. Parameter 2 is 8 hosts (in net order), parm 3 is the null-terminated
* name. Parameter 4 is the length of the name, including the null. Parm 5 is the
afs_CacheInit(cparms.cacheScaches, cparms.cacheFiles,
cparms.cacheBlocks, cparms.cacheDcaches,
cparms.cacheVolumes, cparms.chunkSize,
- cparms.memCacheFlag, cparms.inodes, cparms.users,
+ cparms.memCacheFlag, cparms.inodes, cparms.users,
cparms.dynamic_vcaches);
} else if (parm == AFSOP_CACHEINODE) {
afs_tpct1 = 0;
afs_tpct2 = 0;
splitdcache = 0;
- } else {
+ } else {
splitdcache = 1;
}
afs_osi_Wakeup(&afs_initState);
refresh = 1;
}
- /* Bind, but only if there's only one address configured */
+ /* Bind, but only if there's only one address configured */
if ( count & 0x80000000) {
count &= ~0x80000000;
if (count == 1)
extern u_long sb_max_dflt;
if (!adjusted) {
adjusted = 1;
- if (sb_max_dflt < 131072) sb_max_dflt = 131072;
- if (sb_max < 131072) sb_max = 131072;
+ if (sb_max_dflt < 131072) sb_max_dflt = 131072;
+ if (sb_max < 131072) sb_max = 131072;
}
} */
#endif /* AFS_AIX32_ENV */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
a_result->lock.pid_writer = 0;
a_result->lock.src_indicator = 0;
#endif /* INSTRUMENT_LOCKS */
-#if !defined(AFS_64BIT_ENV)
+#if !defined(AFS_64BIT_ENV)
a_result->Length.high = 0;
a_result->Length.low = tvc->f.m.Length;
#else
*
* Description:
* Clear out callback information for the specified file, or
- * even a whole volume. Used to worry about callback was from
+ * even a whole volume. Used to worry about callback was from
* within the particular cell or not. Now we don't bother with
* that anymore; it's not worth the time.
*
i = VCHashV(&localFid);
for (tq = afs_vhashTV[i].prev; tq != &afs_vhashTV[i]; tq = uq) {
uq = QPrev(tq);
- tvc = QTOVH(tq);
+ tvc = QTOVH(tq);
if (tvc->f.fid.Fid.Volume == a_fid->Volume) {
tvc->callback = NULL;
if (!localFid.Cell)
* a_call : Ptr to Rx call on which this request came in.
*
* Returns:
- * RXGEN_OPCODE (always).
+ * RXGEN_OPCODE (always).
*
* Environment:
* Nothing interesting.
* All done at this level ... ascend and resume the search.
*/
if (this_parent != parent) {
- next = this_parent->d_child.next;
+ next = this_parent->d_child.next;
this_parent = this_parent->d_parent;
goto resume;
}
searchdone3:
if (d_unhashed(dentry))
*flags = 1;
- else
+ else
*flags = 0;
*fileName = afs_strdup(dentry->d_name.name?dentry->d_name.name:"");
cur = head;
while ((cur = cur->next) != head) {
dentry = list_entry(cur, struct dentry, d_alias);
-
+
dget_locked(dentry);
-
+
#if defined(AFS_LINUX24_ENV)
spin_unlock(&dcache_lock);
#endif
goto fcnDone;
}
dput(dentry);
- }
+ }
searchdone2:
if (cur == head) {
/*Past EOF*/
if (d_unhashed(dentry))
*flags = 1;
- else
+ else
*flags = 0;
*fileName = afs_strdup(dentry->d_name.name?dentry->d_name.name:"");
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* The base of the hash table moves periodically (every 128 seconds)
* QueueCallback rarely touches the first 3 slots in the hash table
* (only when called from CheckCallbacks) since MinTimeOut in
- * viced/callback.c is currently 7 minutes.
+ * viced/callback.c is currently 7 minutes.
* Therefore, CheckCallbacks should be able to run concurrently with
* QueueCallback, given the proper locking, of course.
*
* Note:
* 1. CheckCallbacks and BumpBase never run simultaneously. This is because
- * they are only called from afs_Daemon. Therefore, base and basetime will
+ * they are only called from afs_Daemon. Therefore, base and basetime will
* always be consistent during CheckCallbacks.
- * 2. cbHashT [base] rarely (if ever) gets stuff queued in it. The only way
+ * 2. cbHashT [base] rarely (if ever) gets stuff queued in it. The only way
* that could happen is CheckCallbacks might fencepost and move something in
* place, or BumpBase might push some stuff up.
- * 3. Hash chains aren't particularly sorted.
+ * 3. Hash chains aren't particularly sorted.
* 4. The file server keeps its callback state around for 3 minutes
* longer than it promises the cache manager in order to account for
* clock skew, network delay, and other bogeymen.
*
* For now I just use one large lock, which is fine on a uniprocessor,
- * since it's not held during any RPCs or low-priority I/O operations.
- * To make this code MP-fast, you need no more locks than processors,
- * but probably more than one. In measurements on MP-safe implementations,
+ * since it's not held during any RPCs or low-priority I/O operations.
+ * To make this code MP-fast, you need no more locks than processors,
+ * but probably more than one. In measurements on MP-safe implementations,
* I have never seen any contention over the xcbhash lock.
*
* Incompatible operations:
* Certain invariants exist:
* 1 Callback expiration times granted by a file server will never
* decrease for a particular vnode UNLESS a CallBack RPC is invoked
- * by the server in the interim.
+ * by the server in the interim.
* 2 A vcache will always expire no sooner than the slot in which it is
- * currently enqueued. Callback times granted by the server may
- * increase, in which case the vcache will be updated in-place. As a
- * result, it may expire later than the slot in which it is enqueued.
+ * currently enqueued. Callback times granted by the server may
+ * increase, in which case the vcache will be updated in-place. As a
+ * result, it may expire later than the slot in which it is enqueued.
* Not to worry, the CheckCallbacks code will move it if neccessary.
- * This approach means that busy vnodes won't be continually moved
+ * This approach means that busy vnodes won't be continually moved
* around within the expiry queue: they are only moved when they
* finally advance to the lead bucket.
* 3 Anything which has a callback on it must be in the expiry
/* afs_QueueCallback
* Takes a write-locked vcache pointer and a callback expiration time
* as returned by the file server (ie, in units of 128 seconds from "now").
- *
+ *
* Uses the time as an index into a hash table, and inserts the vcache
* structure into the overflow chain.
- *
+ *
* If the vcache is already on some hash chain, leave it there.
* CheckCallbacks will get to it eventually. In the meantime, it
- * might get flushed, or it might already be on the right hash chain,
+ * might get flushed, or it might already be on the right hash chain,
* so why bother messing with it now?
*
* NOTE: The caller must hold a write lock on afs_xcbhash
*
* for now, just get a lock on everything when doing the dequeue, don't
* worry about getting a lock on the individual slot.
- *
+ *
* the only other places that do anything like dequeues are CheckCallbacks
* and BumpBase.
*
* so GetVCache (for example) may update cbExpires before or after #1
* below. If before, CheckCallbacks moves this entry to its proper
* slot. If after, GetVCache blocks in the call to QueueCallbacks,
- * this code dequeues the vcache, and then QueueCallbacks re-enqueues it.
+ * this code dequeues the vcache, and then QueueCallbacks re-enqueues it.
*
* XXX to avoid the race, make QueueCallback take the "real" time
- * and update cbExpires under the xcbhash lock.
+ * and update cbExpires under the xcbhash lock.
*
* NB #1: There's a little optimization here: if I go to invalidate a
* RO vcache or volume, first check to see if the server is down. If
return;
} /* afs_CheckCallback */
-/* afs_FlushCBs
+/* afs_FlushCBs
* to be used only in dire circumstances, this drops all callbacks on
- * the floor, without giving them back to the server. It's ok, the server can
+ * the floor, without giving them back to the server. It's ok, the server can
* deal with it, but it is a little bit rude.
*/
void
memset(cbHashT, 0, CBHTSIZE * sizeof(struct bucket));
for (i = 0; i < CBHTSIZE; i++) {
QInit(&(cbHashT[i].head));
- /* Lock_Init(&(cbHashT[i].lock)); only if you want lots of locks, which
+ /* Lock_Init(&(cbHashT[i].lock)); only if you want lots of locks, which
* don't seem too useful at present. */
}
base = 0;
* careful that it doesn't get permanently out-of-date. Important
* assumption: this routine is only called from afs_Daemon, so there
* can't be more than one instance of this running at any one time.
- * Presumes that basetime is never 0, and is always sane.
+ * Presumes that basetime is never 0, and is always sane.
*
* Before calling this routine, be sure that the first slot is pretty
* empty. This -20 is because the granularity of the checks in
* sometimes. The fact that I only bump basetime by CBHTSLOTLEN-1
* instead of the whole CBHTSLOTLEN is also for "safety".
* Conceptually, it makes this clock run just a little faster than the
- * clock governing which slot a callback gets hashed into. Both of these
- * things make CheckCallbacks work a little harder than it would have to
+ * clock governing which slot a callback gets hashed into. Both of these
+ * things make CheckCallbacks work a little harder than it would have to
* if I wanted to cut things finer.
* Everything from the old first slot is carried over into the new first
* slot. Thus, if there were some things that ought to have been invalidated,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
if (hostCount)
- code = afs_NewCell(acellName, cellHosts, CNoSUID, NULL, 0, 0,
+ code = afs_NewCell(acellName, cellHosts, CNoSUID, NULL, 0, 0,
timeout);
- if (!hostCount || (code && code != EEXIST))
+ if (!hostCount || (code && code != EEXIST))
/* null out the cellname if the lookup failed */
afsdb_req.cellname = NULL;
else
}
-/*!
+/*!
* Look up AFSDB for given cell name and create locally.
- * \param acellName Cell name.
+ * \param acellName Cell name.
*/
void
afs_LookupAFSDB(char *acellName)
char *cellName = afs_strdup(acellName);
code = afs_GetCellHostsAFSDB(cellName);
- afs_Trace2(afs_iclSetp, CM_TRACE_AFSDB, ICL_TYPE_STRING, cellName,
+ afs_Trace2(afs_iclSetp, CM_TRACE_AFSDB, ICL_TYPE_STRING, cellName,
ICL_TYPE_INT32, code);
afs_osi_FreeStr(cellName);
}
/*!
* Look up a cell name by id.
* \param cellnum
- * \return
+ * \return
*/
static struct cell_name *
afs_cellname_lookup_id(afs_int32 cellnum)
/*!
* Look up a cell name.
* \param name Cell name.
- * \return
+ * \return
*/
static struct cell_name *
afs_cellname_lookup_name(char *name)
/*!
* \brief Load the list of cells from given inode.
* \param inode Source inode.
- * \param lookupcode
+ * \param lookupcode
* \return 0 for success. < 0 for error.
*/
int
/*!
* Look up cell alias by alias name.
- * \param alias
+ * \param alias
* \return Found struct or NULL.
*/
static struct cell_alias *
/*!
* Get cell alias by index (starting at 0).
- * \param index Cell index.
+ * \param index Cell index.
* \return Found struct or null.
*/
struct cell_alias *
/*!
* Put back a cell alias returned by Find or Get.
- * \param a Alias.
- * \return
+ * \param a Alias.
+ * \return
*/
void
afs_PutCellAlias(struct cell_alias *a)
* Create new cell alias entry and update dynroot vnode.
* \param alias
* \param cell
- * \return
+ * \return
*/
afs_int32
afs_NewCellAlias(char *alias, char *cell)
/*!
* Bump given cell up to the front of the LRU queue.
- * \param c Cell to set.
+ * \param c Cell to set.
*/
static void
afs_UpdateCellLRU(struct cell *c)
/*!
* Look up cell information in AFSDB if timeout expired
* \param ac Cell to be refreshed.
- * \return
+ * \return
*/
static void
afs_RefreshCell(struct cell *ac)
afs_LookupAFSDB(ac->cellName);
}
-/*!
+/*!
* Execute a callback for each existing cell, without a lock on afs_xcell.
* Iterate on CellLRU, and execute a callback for each cell until given arguments are met.
* \see afs_TraverseCells
* Execute a callback for each existing cell, with a lock on afs_xcell.
* \see afs_TraverseCells_nl
* \param cb Traversal callback for each cell.
- * \param arg
+ * \param arg
* \return Found data or NULL.
*/
void *
/*!
* Useful traversal callback: Match by name.
- * \param cell
+ * \param cell
* \param arg Cell name (compared with cell->cellName).
* \return Returns found cell or NULL.
*/
/*!
* Useful traversal callback: Match by handle.
- * \param cell
+ * \param cell
* \param arg Cell handle (compared with cell->cellHandle).
* \return Returns found cell or NULL.
*/
/*!
* Useful traversal callback: Match by cell number.
- * \param cell
+ * \param cell
* \param arg Cell number (compared with cell->cellNum).
* \return Returns found cell or NULL.
*/
/*!
* Useful traversal callback: Match by index.
- * \param cell
+ * \param cell
* \param arg Cell index (compared with cell->cellIndex).
* \return Returns found cell or NULL.
*/
* Does not check AFSDB.
* \param acellName Cell name.
* \param locktype Type of lock to be used (not used).
- * \return
+ * \return
*/
static struct cell *
afs_FindCellByName_nl(char *acellName, afs_int32 locktype)
* Does not check AFSDB.
* \param acellName Cell name.
* \param locktype Type of lock to be used.
- * \return
+ * \return
*/
static struct cell *
afs_FindCellByName(char *acellName, afs_int32 locktype)
* Same as FindCellByName but tries AFSDB if not found.
* \param acellName Cell name.
* \param locktype Type of lock to be used.
- * \return
+ * \return
*/
struct cell *
afs_GetCellByName(char *acellName, afs_int32 locktype)
/*!
* Return a cell with a given cell number.
* \param cellnum Cell number.
- * \param locktype Lock to be used.
- * \return
+ * \param locktype Lock to be used.
+ * \return
*/
struct cell *
afs_GetCell(afs_int32 cellnum, afs_int32 locktype)
* Same as GetCell, but does not try to refresh the data.
* \param cellnum Cell number.
* \param locktype What lock should be used.
- * \return
+ * \return
*/
struct cell *
afs_GetCellStale(afs_int32 cellnum, afs_int32 locktype)
* Return a cell with a given index number (starting at 0). Update CellLRU as well.
* \param index
* \param locktype Type of lock used.
- * \return
+ * \return
*/
struct cell *
afs_GetCellByIndex(afs_int32 index, afs_int32 locktype)
* Return a cell with a given handle..
* \param index
* \param locktype Type of lock used.
- * \return
+ * \return
*/
struct cell *
afs_GetCellByHandle(void *handle, afs_int32 locktype)
/*!
* Return primary cell, if any.
* \param locktype Type of lock used.
- * \return
+ * \return
*/
struct cell *
afs_GetPrimaryCell(afs_int32 locktype)
/*!
* Returns true if the given cell is the primary cell.
* \param cell
- * \return
+ * \return
*/
int
afs_IsPrimaryCell(struct cell *cell)
/*!
* Returns afs_IsPrimaryCell(afs_GetCell(cellnum)).
- * \param cellnum
- * \return
+ * \param cellnum
+ * \return
*/
int
afs_IsPrimaryCellNum(afs_int32 cellnum)
/*!
* Set the primary cell name to the given cell name.
- * \param acellName Cell name.
+ * \param acellName Cell name.
* \return 0 for success, < 0 for error.
*/
afs_int32
}
/*!
- * Create or update a cell entry.
+ * Create or update a cell entry.
* \param acellName Name of cell.
* \param acellHosts Array of hosts that this cell has.
* \param aflags Cell flags.
- * \param linkedcname
+ * \param linkedcname
* \param fsport File server port.
* \param vlport Volume server port.
* \param timeout Cell timeout value, 0 means static AFSDB entry.
- * \return
+ * \return
*/
afs_int32
afs_NewCell(char *acellName, afs_int32 * acellHosts, int aflags,
}
tc->states |= aflags;
tc->timeout = timeout;
-
+
memset(tc->cellHosts, 0, sizeof(tc->cellHosts));
for (i = 0; i < AFS_MAXCELLHOSTS; i++) {
- /* Get server for each host and link this cell in.*/
+ /* Get server for each host and link this cell in.*/
struct server *ts;
afs_uint32 temp = acellHosts[i];
if (!temp)
afs_PutServer(ts, WRITE_LOCK);
}
afs_SortServers(tc->cellHosts, AFS_MAXCELLHOSTS); /* randomize servers */
-
+
/* New cell: Build and add to LRU cell queue. */
if (newc) {
struct cell_name *cn;
/*!
* Remove a server from a cell's server list.
* \param srvp Server to be removed.
- * \return
+ * \return
*/
void
afs_RemoveCellEntry(struct server *srvp)
/*!
* Check if the given name exists as a cell or alias. Does not lock afs_xcell.
- * \param aname
- * \return
+ * \param aname
+ * \return
*/
static int
afs_CellOrAliasExists_nl(char *aname)
/*!
* Check if the given name exists as a cell or alias. Locks afs_xcell.
* \param aname
- * \return
+ * \return
*/
int
afs_CellOrAliasExists(char *aname)
/*!
* Check if a cell number is valid (also set the used flag).
- * \param cellnum
+ * \param cellnum
* \return 1 - true, 0 - false
*/
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_FirstCSize = afs_OtherCSize = (1 << chunk); }
/*
- * Functions exported by a cache type
+ * Functions exported by a cache type
*/
struct afs_cacheOps {
#define afs_GetVolSlot() (*(afs_cacheType->GetVolSlot))()
#define afs_HandleLink(avc, areq) (*(afs_cacheType->HandleLink))(avc, areq)
-/* These memcpys should get optimised to simple assignments when afs_dcache_id_t
+/* These memcpys should get optimised to simple assignments when afs_dcache_id_t
* is simple */
static_inline void afs_copy_inode(afs_dcache_id_t *dst, afs_dcache_id_t *src) {
memcpy(dst, src, sizeof(afs_dcache_id_t));
memset(i, 0, sizeof(afs_dcache_id_t));
}
-/* We need to have something we can output as the 'inode' for fstrace calls.
+/* We need to have something we can output as the 'inode' for fstrace calls.
* This is a hack */
static_inline int afs_inode2trace(afs_dcache_id_t *i) {
return i->mem;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Try setting up a connection to the server containing the specified fid.
* Gets the volume, checks if it's up and does the connection by server address.
*
- * @param afid
+ * @param afid
* @param areq Request filled in by the caller.
* @param locktype Type of lock that will be used.
*
*/
for (notbusy = not_busy; (!lowp && (notbusy <= end_not_busy)); notbusy++) {
for (i = 0; i < AFS_MAXHOSTS && tv->serverHost[i]; i++) {
- if (((areq->tokenError > 0)||(areq->idleError > 0))
+ if (((areq->tokenError > 0)||(areq->idleError > 0))
&& (areq->skipserver[i] == 1))
continue;
if (tv->status[i] != notbusy) {
ReleaseSharedLock(&afs_xconn);
return NULL;
}
-
+
if (AFS_IS_DISCONNECTED && !AFS_IN_SYNC) {
afs_warnuser("afs_ConnBySA: disconnected\n");
ReleaseSharedLock(&afs_xconn);
return NULL;
}
-/*
+/*
1. look for an existing connection
2. create a connection at an address believed to be up
(if aforce is true, create a connection at the first address)
} /*afs_PutConn */
-/**
- * For multi homed clients, a RPC may timeout because of a
- * client network interface going down. We need to reopen new
+/**
+ * For multi homed clients, a RPC may timeout because of a
+ * client network interface going down. We need to reopen new
* connections in this case.
*
* @param sap Server address.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* 18285 is because we're trying to divide evenly into 128, that is,
* CBSlotLen, while staying just under 20 seconds. If CBSlotLen
- * changes, should probably change this interval, too.
+ * changes, should probably change this interval, too.
* Some of the preceding actions may take quite some time, so we
* might not want to wait the entire interval */
now = 18285 - (osi_Time() - now);
cred_t *credp;
struct dentry *dp;
struct vcache *vcp;
-
+
afs_rootFid.Fid.Volume = volid;
afs_rootFid.Fid.Vnode = 1;
afs_rootFid.Fid.Unique = 1;
-
+
credp = crref();
if (afs_InitReq(&treq, credp))
goto out;
goto out;
afs_getattr(vcp, &vattr, credp);
afs_fill_inode(AFSTOV(vcp), &vattr);
-
+
dp = d_find_alias(AFSTOV(afs_globalVp));
-
+
#if defined(AFS_LINUX24_ENV)
spin_lock(&dcache_lock);
#if defined(AFS_LINUX26_ENV)
spin_unlock(&dcache_lock);
#endif
dput(dp);
-
+
AFS_FAST_RELE(afs_globalVp);
afs_globalVp = vcp;
out:
if (tdc) {
afs_PutDCache(tdc);
}
- abyte+=len;
+ abyte+=len;
totallen += len;
} while ((totallen < afs_preCache) && tdc && (len > 0));
/* now, dude may be waiting for us to clear DFFetchReq bit; do so. Can't
{
struct vrequest treq;
afs_size_t len;
-
+
if ((len = afs_InitReq(&treq, ab->cred)))
return;
}
#ifdef AFS_AIX41_ENV
-/* AIX 4.1 has a much different sleep/wakeup mechanism available for use.
+/* AIX 4.1 has a much different sleep/wakeup mechanism available for use.
* The modifications here will work for either a UP or MP machine.
*/
struct buf *afs_asyncbuf = (struct buf *)0;
afs_int32 afs_biodcnt = 0;
/* in implementing this, I assumed that all external linked lists were
- * null-terminated.
+ * null-terminated.
*
* Several places in this code traverse a linked list. The algorithm
* used here is probably unfamiliar to most people. Careful examination
*
* This function obtains, and returns, a pointer to a buffer for
* processing by a daemon. It sleeps until such a buffer is available.
- * The source of buffers for it is the list afs_asyncbuf (see also
+ * The source of buffers for it is the list afs_asyncbuf (see also
* afs_gn_strategy). This function may be invoked concurrently by
* several processes, that is, several instances of the same daemon.
* afs_gn_strategy, which adds buffers to the list, runs at interrupt
*
* Since AIX 4.1 can wake just one process at a time, the separate sleep
* addresses have been removed.
- * Note that the kernel_lock is held until the e_sleep_thread() occurs.
+ * Note that the kernel_lock is held until the e_sleep_thread() occurs.
* The afs_asyncbuf_lock is primarily used to serialize access between
* process and interrupts.
*/
/* ??? Does the forward pointer of the returned buffer need to be NULL?
*/
- /* Disable interrupts from the strategy function, and save the
+ /* Disable interrupts from the strategy function, and save the
* prior priority level and lock access to the afs_asyncbuf.
*/
AFS_GUNLOCK();
/* For the convenience of other code, replace the gnodes in
* the b_vp field of bp and the other buffers on the b_work
- * chain with the corresponding vnodes.
+ * chain with the corresponding vnodes.
*
* ??? what happens to the gnodes? They're not just cut loose,
* are they?
limit_sigs(&sigbits, &osigbits); /* and already masked */
}
/* Main body starts here -- this is an intentional infinite loop, and
- * should NEVER exit
+ * should NEVER exit
*
- * Now, the loop will exit if get_bioreq() returns NULL, indicating
+ * Now, the loop will exit if get_bioreq() returns NULL, indicating
* that we've been interrupted.
*/
while (1) {
ReleaseWriteLock(&vcp->lock);
}
/* If the buffer represents a protection violation, rather than
- * an actual request for I/O, no special action need be taken.
+ * an actual request for I/O, no special action need be taken.
*/
if (bp->b_flags & B_PFPROT) {
iodone(bp); /* Notify all users of the buffer that we're done */
* buffer may be linked with other buffers via the b_work field.
* See also afs_gn_strategy. For each buffer in the chain (including
* bp) notify all users of the buffer that the daemon is finished
- * using it by calling iodone.
+ * using it by calling iodone.
* assumes iodone can modify the b_work field.
*/
for (tbp1 = bp;;) {
tb->opcode);
if (tb->opcode == BOP_FETCH)
BPrefetch(tb);
-#if defined(AFS_CACHE_BYPASS)
+#if defined(AFS_CACHE_BYPASS)
else if (tb->opcode == BOP_FETCH_NOCACHE)
BPrefetchNoCache(tb);
-#endif
+#endif
else if (tb->opcode == BOP_STORE)
BStore(tb);
else if (tb->opcode == BOP_PATH)
/*
* Copyright 2000, International Business Machines Corporation and others.
*$All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 afs_cacheStats; /*!< Stat entries in cache */
afs_int32 afs_blocksUsed; /*!< Number of blocks in use */
afs_int32 afs_blocksDiscarded; /*!<Blocks freed but not truncated */
-afs_int32 afs_fsfragsize = AFS_MIN_FRAGSIZE; /*!< Underlying Filesystem minimum unit
+afs_int32 afs_fsfragsize = AFS_MIN_FRAGSIZE; /*!< Underlying Filesystem minimum unit
*of disk allocation usually 1K
*this value is (truefrag -1 ) to
*save a bunch of subtracts... */
* 2 : RO
*/
static afs_int32
-afs_DCGetBucket(struct vcache *avc)
+afs_DCGetBucket(struct vcache *avc)
{
- if (!splitdcache)
+ if (!splitdcache)
return 1;
-
+
/* This should be replaced with some sort of user configurable function */
if (avc->f.states & CRO) {
return 2;
* \param newSize The new size to be adjusted to.
*
*/
-static void
+static void
afs_DCAdjustSize(struct dcache *adc, afs_int32 oldSize, afs_int32 newSize)
{
afs_int32 adjustSize = newSize - oldSize;
- if (!splitdcache)
+ if (!splitdcache)
return;
- switch (adc->bucket)
+ switch (adc->bucket)
{
case 0:
afs_blocksUsed_0 += adjustSize;
/*!
* Move a dcache from one bucket to another.
- *
+ *
* \param adc Operate on this dcache.
* \param size Size in bucket (?).
* \param newBucket Destination bucket.
*
*/
-static void
+static void
afs_DCMoveBucket(struct dcache *adc, afs_int32 size, afs_int32 newBucket)
{
- if (!splitdcache)
+ if (!splitdcache)
return;
- /* Substract size from old bucket. */
- switch (adc->bucket)
+ /* Substract size from old bucket. */
+ switch (adc->bucket)
{
case 0:
afs_blocksUsed_0 -= size;
/* Set new bucket and increase destination bucket size. */
adc->bucket = newBucket;
- switch (adc->bucket)
+ switch (adc->bucket)
{
case 0:
afs_blocksUsed_0 += size;
afs_blocksUsed_2 += size;
break;
}
-
+
return;
}
/*!
* Init split caches size.
*/
-static void
-afs_DCSizeInit(void)
+static void
+afs_DCSizeInit(void)
{
afs_blocksUsed_0 = afs_blocksUsed_1 = afs_blocksUsed_2 = 0;
}
* \param bucket
*/
static afs_int32
-afs_DCWhichBucket(afs_int32 phase, afs_int32 bucket)
+afs_DCWhichBucket(afs_int32 phase, afs_int32 bucket)
{
- if (!splitdcache)
+ if (!splitdcache)
return 0;
afs_pct1 = afs_blocksUsed_1 / (afs_cacheBlocks / 100);
afs_pct2 = afs_blocksUsed_2 / (afs_cacheBlocks / 100);
/* Short cut: if we don't know about it, try to kill it */
- if (phase < 2 && afs_blocksUsed_0)
+ if (phase < 2 && afs_blocksUsed_0)
return 0;
-
- if (afs_pct1 > afs_tpct1)
+
+ if (afs_pct1 > afs_tpct1)
return 1;
if (afs_pct2 > afs_tpct2)
return 2;
/*!
* Keeps the cache clean and free by truncating uneeded files, when used.
- * \param
- * \return
+ * \param
+ * \return
*/
void
afs_CacheTruncateDaemon(void)
* 1. only grab up to anumber victims if aneedSpace <= 0, not
* the whole set of MAXATONCE.
* 2. dynamically choose MAXATONCE to reflect severity of
- * demand: something like (*aneedSpace >> (logChunk - 9))
+ * demand: something like (*aneedSpace >> (logChunk - 9))
*
* \note N.B. if we're called with aneedSpace <= 0 and anumber > 0, that
* indicates that the cache is not properly configured/tuned or
if (CheckLock(&afs_xdcache) != -1)
osi_Panic("getdownd nolock");
/* decrement anumber first for all dudes in free list */
- /* SHOULD always decrement anumber first, even if aneedSpace >0,
+ /* SHOULD always decrement anumber first, even if aneedSpace >0,
* because we should try to free space even if anumber <=0 */
if (!aneedSpace || *aneedSpace <= 0) {
anumber -= afs_freeDCCount;
/* rewrite so phases include a better eligiblity for gc test*/
/*
* The phase variable manages reclaims. Set to 0, the first pass,
- * we don't reclaim active entries, or other than target bucket.
+ * we don't reclaim active entries, or other than target bucket.
* Set to 1, we reclaim even active ones in target bucket.
* Set to 2, we reclaim any inactive one.
* Set to 3, we reclaim even active ones.
#endif
ReleaseWriteLock(&afs_xdcache);
/*
- * It's treated like a callback so that when we do lookups we'll
+ * It's treated like a callback so that when we do lookups we'll
* invalidate the unique bit if any
* trytoSmush occured during the lookup call
*/
* Description
* Given the cached info for a file, return the number of chunks that
* are not available from the dcache.
- *
+ *
* Parameters:
* avc: Pointer to the (held) vcache entry to look in.
- *
+ *
* Returns:
* The number of chunks which are not currently cached.
- *
+ *
* Environment:
* The vcache entry is held upon entry.
*/
*/
if (avc->f.fid.Fid.Vnode & 1 || vType(avc) == VDIR)
totalChunks = 1;
-
+
/*
printf("Should have %d chunks for %u bytes\n",
totalChunks, (totalLength + 1));
hadd32(afs_indexCounter, 1);
ReleaseWriteLock(&afs_xdcache);
return tdc;
- }
+ }
ReleaseWriteLock(&afs_xdcache);
return NULL;
} /*afs_FindDCache */
if (dcLocked && (tdc->index != NULLIDX)
&& !FidCmp(&tdc->f.fid, &avc->f.fid) && chunk == tdc->f.chunk
&& !(afs_indexFlags[tdc->index] & (IFFree | IFDiscarded))) {
- /* got the right one. It might not be the right version, and it
+ /* got the right one. It might not be the right version, and it
* might be fetching, but it's the right dcache entry.
*/
/* All this code should be integrated better with what follows:
code = -1;
if (code == 0) {
- /* callback could have been broken (or expired) in a race here,
+ /* callback could have been broken (or expired) in a race here,
* but we return the data anyway. It's as good as we knew about
* when we started. */
- /*
- * validPos is updated by CacheFetchProc, and can only be
- * modifed under a dcache write lock, which we've blocked out
+ /*
+ * validPos is updated by CacheFetchProc, and can only be
+ * modifed under a dcache write lock, which we've blocked out
*/
size = tdc->validPos - Position; /* actual segment size */
if (size < 0)
} else if (tdc->f.states & DBackup) {
afs_DCMoveBucket(tdc, 0, 1);
} else {
- afs_DCMoveBucket(tdc, 0, 1);
+ afs_DCMoveBucket(tdc, 0, 1);
}
- }
+ }
}
tdc->refCount = 1;
tdc->index = aslot;
* Initialize dcache related variables.
*
* \param afiles
- * \param ablocks
+ * \param ablocks
* \param aDentries
* \param achunk
* \param aflags
afs_dcentries = aDentries;
afs_blocksUsed = 0;
- afs_stats_cmperf.cacheBucket0_Discarded =
- afs_stats_cmperf.cacheBucket1_Discarded =
+ afs_stats_cmperf.cacheBucket0_Discarded =
+ afs_stats_cmperf.cacheBucket1_Discarded =
afs_stats_cmperf.cacheBucket2_Discarded = 0;
afs_DCSizeInit();
QInit(&afs_DLRU);
afs_osi_Free(afs_dchashTbl, afs_dhashsize * sizeof(afs_int32));
afs_blocksUsed = afs_dcentries = 0;
- afs_stats_cmperf.cacheBucket0_Discarded =
- afs_stats_cmperf.cacheBucket1_Discarded =
+ afs_stats_cmperf.cacheBucket0_Discarded =
+ afs_stats_cmperf.cacheBucket1_Discarded =
afs_stats_cmperf.cacheBucket2_Discarded = 0;
hzero(afs_indexCounter);
/*!
* Get a dcache ready for writing, respecting the current cache size limits
*
- * len is required because afs_GetDCache with flag == 4 expects the length
- * field to be filled. It decides from this whether it's necessary to fetch
- * data into the chunk before writing or not (when the whole chunk is
+ * len is required because afs_GetDCache with flag == 4 expects the length
+ * field to be filled. It decides from this whether it's necessary to fetch
+ * data into the chunk before writing or not (when the whole chunk is
* overwritten!).
*
* \param avc The vcache to fetch a dcache for
* \param noLock
*
* \return If successful, a reference counted dcache with tdc->lock held. Lock
- * must be released and afs_PutDCache() called to free dcache.
+ * must be released and afs_PutDCache() called to free dcache.
* NULL on failure
*
- * \note avc->lock must be held on entry. Function may release and reobtain
+ * \note avc->lock must be held on entry. Function may release and reobtain
* avc->lock and GLOCK.
*/
struct dcache *
-afs_ObtainDCacheForWriting(struct vcache *avc, afs_size_t filePos,
+afs_ObtainDCacheForWriting(struct vcache *avc, afs_size_t filePos,
afs_size_t len, struct vrequest *areq,
int noLock)
{
new_dc->f.chunkBytes = adc->f.chunkBytes;
ReleaseReadLock(&adc->mflock);
-
+
/* Now add to the two hash chains */
i = DCHash(&shadow_fid, 0);
afs_dcnextTbl[new_dc->index] = afs_dchashTbl[i];
* \param alen The new length of the file
*
*/
-void
+void
afs_PopulateDCache(struct vcache *avc, afs_size_t apos, struct vrequest *areq)
{
struct dcache *tdc;
afs_int32 start, end;
/* We're doing this to deal with the situation where we extend
- * by writing after lseek()ing past the end of the file . If that
- * extension skips chunks, then those chunks won't be created, and
- * GetDCache will assume that they have to be fetched from the server.
- * So, for each chunk between the current file position, and the new
+ * by writing after lseek()ing past the end of the file . If that
+ * extension skips chunks, then those chunks won't be created, and
+ * GetDCache will assume that they have to be fetched from the server.
+ * So, for each chunk between the current file position, and the new
* length we GetDCache for that chunk.
*/
- if (AFS_CHUNK(apos) == 0 || apos <= avc->f.m.Length)
+ if (AFS_CHUNK(apos) == 0 || apos <= avc->f.m.Length)
return;
if (avc->f.m.Length == 0)
start = 0;
- else
+ else
start = AFS_CHUNK(avc->f.m.Length)+1;
end = AFS_CHUNK(apos);
#include <afsconfig.h>
#include "afs/param.h"
-
-
+
+
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "afs/afs_stats.h" /* statistics */
*/
int
-afs_GetParentVCache(struct vcache *avc, int deleted, struct VenusFid *afid,
+afs_GetParentVCache(struct vcache *avc, int deleted, struct VenusFid *afid,
char *aname, struct vcache **adp)
{
int code;
return ENOMEM;
code = afs_GetParentVCache(avc, 0, &pdir_fid, tname, &tdp);
- if (code)
+ if (code)
goto end;
/* This data may also be in linkData, but then we have to deal with
ReleaseReadLock(&tdc->lock);
afs_PutDCache(tdc);
}
-
+
/* Set status. */
InStatus.Mask = AFS_SETMODTIME | AFS_SETMODE | AFS_SETGROUP;
InStatus.ClientModTime = avc->f.m.Date;
*/
tdc = afs_FindDCacheByFid(&avc->f.fid);
if (tdc) {
- afs_dir_ChangeFid(tdc, ".", &avc->f.fid.Fid.Vnode,
+ afs_dir_ChangeFid(tdc, ".", &avc->f.fid.Fid.Vnode,
&newFid.Fid.Vnode);
if (avc->f.m.LinkCount >= 2)
- /* For non empty dirs, fix children's parentVnode and
+ /* For non empty dirs, fix children's parentVnode and
* parentUnique reference.
*/
afs_FixChildrenFids(&avc->f.fid, &newFid);
if (tdp)
afs_PutVCache(tdp);
afs_osi_Free(tname, AFSNAMEMAX);
- if (ttargetName)
+ if (ttargetName)
afs_osi_Free(ttargetName, tlen);
return code;
}
next_file:
ObtainWriteLock(&afs_disconDirtyLock, 710);
if (code == 0) {
- /* Replayed successfully - pull the vcache from the
+ /* Replayed successfully - pull the vcache from the
* disconnected list */
tvc->f.ddirty_flags = 0;
QRemove(&tvc->dirtyq);
afs_PutVCache(tvc);
} else {
if (code == EAGAIN) {
- /* Operation was deferred. Pull it from the current place in
+ /* Operation was deferred. Pull it from the current place in
* the list, and stick it at the end again */
QRemove(&tvc->dirtyq);
QAdd(&afs_disconDirty, &tvc->dirtyq);
* Discard all of our shadow directory copies. If squash is true, then
* we also invalidate the vcache holding the shadow directory, to ensure
* that any disconnected changes are deleted
- *
+ *
* \param squash
* \param acred
*
* \param acred
*
*/
-void
+void
afs_DisconDiscardAll(afs_ucred_t *acred)
{
struct vcache *tvc;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
break;
case ICL_OP_SS_FREE: /* deassert design for log */
- /*
+ /*
* if we are already in this state, do nothing; otherwise
* deassert desire for log
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
QInit(&afs_disconShadow);
osi_dnlc_init();
- /*
- * create volume list structure
+ /*
+ * create volume list structure
*/
if (aVolumes < 50)
aVolumes = 50;
{
afs_dcache_id_t inode;
int code = 0;
-
+
code = afs_LookupInodeByPath(afile, &inode.ufs, NULL);
return afs_cellname_init(&inode, code);
}
* Parameters:
* afile : Name of the file assumed to be the cache info file
* for the Cache Manager; it will be used as such.
- * Side Effects: This sets afs_fragsize, which is used in the cache usage
+ * Side Effects: This sets afs_fragsize, which is used in the cache usage
* calculations such as in afs_adjustsize()
*
* Environment:
shutdown_volume();
- /*
- * Free FreeVolList allocations
+ /*
+ * Free FreeVolList allocations
*/
afs_osi_Free(Initialafs_freeVolList,
afs_memvolumes * sizeof(struct volume));
* we simply malloc more; we won't be able to free those additional volumes.
*/
- /*
- * Free Users table allocation
+ /*
+ * Free Users table allocation
*/
{
struct unixuser *tu, *ntu;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
lock->time_waiting.tv_sec = 0;
lock->time_waiting.tv_usec = 0;
}
-\f
+
void
ObtainLock(struct afs_lock *lock, int how,
unsigned int src_indicator)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/*
- * this routine simulates a read in the Memory Cache
+ * this routine simulates a read in the Memory Cache
*/
int
afs_MemReadBlk(struct osi_file *fP, int offset, void *dest,
}
/*
- * this routine simulates a readv in the Memory Cache
+ * this routine simulates a readv in the Memory Cache
*/
int
afs_MemReadvBlk(struct memCacheEntry *mceP, int offset,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_lock_t afs_xnfspag /*, afs_xnfsreq */ ;
extern struct afs_exporter *afs_nfsexporter;
-/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't
+/* Creates an nfsclientpag structure for the (uid, host) pair if one doesn't
* exist. RefCount is incremented and it's time stamped. */
static struct nfsclientpag *
afs_GetNfsClientPag(afs_int32 uid, afs_uint32 host)
}
-/* Return the nfsclientpag structure associated with the (uid, host) or
- * {pag, host} pair, if pag is nonzero. RefCount is incremented and it's
+/* Return the nfsclientpag structure associated with the (uid, host) or
+ * {pag, host} pair, if pag is nonzero. RefCount is incremented and it's
* time stamped. */
static struct nfsclientpag *
afs_FindNfsClientPag(afs_int32 uid, afs_uint32 host, afs_int32 pag)
afs_nfsexporter->exp_stats.calls++;
if (!(afs_nfsexporter->exp_states & EXP_EXPORTED)) {
- /* No afs requests accepted as long as EXPORTED flag is turned 'off'.
- * Set/Reset via a pioctl call (fs exportafs). Note that this is on
- * top of the /etc/exports nfs requirement (i.e. /afs must be
+ /* No afs requests accepted as long as EXPORTED flag is turned 'off'.
+ * Set/Reset via a pioctl call (fs exportafs). Note that this is on
+ * top of the /etc/exports nfs requirement (i.e. /afs must be
* exported to all or whomever there too!)
*/
afs_nfsexporter->exp_stats.rejectedcalls++;
if ((afs_nfsexporter->exp_states & EXP_CLIPAGS))
pag = NOPAG;
if (!np) {
- /* Even if there is a "good" pag coming in we don't accept it if no
- * nfsclientpag struct exists for the user since that would mean
- * that the translator rebooted and therefore we ignore all older
- * pag values
+ /* Even if there is a "good" pag coming in we don't accept it if no
+ * nfsclientpag struct exists for the user since that would mean
+ * that the translator rebooted and therefore we ignore all older
+ * pag values
*/
if ((code = setpag(cred, -1, &pag, 0))) {
if (au)
tsysnames.SysNameList_len <= 0 ||
tsysnames.SysNameList_len > MAXNUMSYSNAMES)
goto done;
-
+
for(i = 0; i < np->sysnamecount; i++)
afs_osi_Free(np->sysname[i], MAXSYSNAME);
/* if inname is non-null, a new system name value is set for the remote
* user (inname contains the new sysname). In all cases, outname returns
* the current sysname value for this remote user */
-int
-afs_nfsclient_sysname(struct nfsclientpag *np, char *inname,
+int
+afs_nfsclient_sysname(struct nfsclientpag *np, char *inname,
char ***outname, int *num, int allpags)
{
struct nfsclientpag *tnp;
int
afs_nfsclient_stats(struct afs_exporter *export)
{
- /* Nothing much to do here yet since most important stats are collected
+ /* Nothing much to do here yet since most important stats are collected
* directly in the afs_exporter structure itself */
AFS_STATCNT(afs_nfsclient_stats);
return 0;
}
}
-/* afs_iauth_unregister - unregister the iauth verify routine. Called on shutdown.
+/* afs_iauth_unregister - unregister the iauth verify routine. Called on shutdown.
*/
void
afs_iauth_unregister(void)
fhp = &sargs->fh;
break;
}
-#if defined(AFS_SUN510_ENV)
+#if defined(AFS_SUN510_ENV)
case ACLPROC2_GETXATTRDIR:
{
struct GETXATTRDIR2args *sargs = (struct GETXATTRDIR2args *)args;
return;
}
-#if defined(AFS_SUN510_ENV)
+#if defined(AFS_SUN510_ENV)
void
afs_acl2_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
{afs_acl2_setacl},
{afs_acl2_getattr},
{afs_acl2_access},
-#if defined(AFS_SUN510_ENV)
+#if defined(AFS_SUN510_ENV)
{afs_acl2_getxattrdir}
#endif
};
fhp = &sargs->fh;
break;
}
-#if defined(AFS_SUN510_ENV)
+#if defined(AFS_SUN510_ENV)
case ACLPROC3_GETXATTRDIR:
{
struct GETXATTRDIR3args *sargs = (struct GETXATTRDIR3args *)args;
return 2;
sa = (struct sockaddr *)svc_getrpccaller(rp->rq_xprt)->buf;
- if (sa == NULL)
+ if (sa == NULL)
return;
if (sa->sa_family == AF_INET)
return;
}
-#if defined(AFS_SUN510_ENV)
+#if defined(AFS_SUN510_ENV)
void
afs_acl3_getxattrdir(char *args, char *xp, char *exp, char *rp, char *crp)
{
{afs_nfs2_null},
{afs_acl3_getacl},
{afs_acl3_setacl},
-#if defined(AFS_SUN510_ENV)
+#if defined(AFS_SUN510_ENV)
{afs_acl3_getxattrdir},
#endif
};
long afs_global_owner;
#endif
-#if defined(AFS_DARWIN_ENV)
+#if defined(AFS_DARWIN_ENV)
thread_t afs_global_owner;
#ifdef AFS_DARWIN80_ENV
lck_mtx_t *afs_global_lock;
}
/* Two hacks to try and fix afsdb */
-void
+void
afs_osi_MaskUserLoop(void)
{
#ifdef AFS_DARWIN_ENV
#endif
}
-void
+void
afs_osi_UnmaskUserLoop(void)
{
#ifdef AFS_DARWIN_ENV
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
#endif
-/*
+/*
* Time related macros
*/
#define osi_GetuTime(x) osi_GetTime(x)
/*
-** Macro for Solaris 2.6 returns 1 if file is larger than 2GB; else returns 0
+** Macro for Solaris 2.6 returns 1 if file is larger than 2GB; else returns 0
*/
#define AfsLargeFileUio(uio) 0
#define AfsLargeFileSize(pos, off) 0
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
LOCK_INIT(&osi_fsplock, "osi_fsplock");
LOCK_INIT(&osi_flplock, "osi_flplock");
}
- if (afs_stats_cmperf.LargeBlocksActive ||
- afs_stats_cmperf.SmallBlocksActive)
+ if (afs_stats_cmperf.LargeBlocksActive ||
+ afs_stats_cmperf.SmallBlocksActive)
{
- afs_warn("WARNING: not all blocks freed: large %d small %d\n",
- afs_stats_cmperf.LargeBlocksActive,
+ afs_warn("WARNING: not all blocks freed: large %d small %d\n",
+ afs_stats_cmperf.LargeBlocksActive,
afs_stats_cmperf.SmallBlocksActive);
}
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
afs_hyper_t origDV;
#if defined(AFS_CACHE_BYPASS)
- /* The optimization to check DV under read lock below is identical a
- * change in CITI cache bypass work. The problem CITI found in 1999
- * was that this code and background daemon doing prefetching competed
- * for the vcache entry shared lock. It's not clear to me from the
+ /* The optimization to check DV under read lock below is identical a
+ * change in CITI cache bypass work. The problem CITI found in 1999
+ * was that this code and background daemon doing prefetching competed
+ * for the vcache entry shared lock. It's not clear to me from the
* tech report, but it looks like CITI fixed the general prefetch code
* path as a bonus when experimenting on prefetch for cache bypass, see
* citi-tr-01-3.
*/
-#endif
+#endif
ObtainReadLock(&avc->lock);
/* If we've already purged this version, or if we're the ones
* writing this version, don't flush it (could lose the
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* cache larger names, perhaps by using a better,longer key (SHA) and discarding
* the actual name itself.
* precompute a key and stuff for \sys, and combine the HandleAtName function with
- * this, since we're looking at the name anyway.
+ * this, since we're looking at the name anyway.
*/
struct afs_lock afs_xdnlc;
#ifdef AFS_DARWIN80_ENV
||(tvc->f.states & CDeadVnode)
#endif
- )
+ )
{
ReleaseReadLock(&afs_xvcache);
dnlcstats.misses++;
ReleaseReadLock(&afs_xvcache);
#ifdef notdef
- /*
+ /*
* XX If LRUme ever is non-zero change the if statement around because
* aix's cc with optimizer on won't necessarily check things in order XX
*/
if (LRUme && (0 == NBObtainWriteLock(&afs_xdnlc))) {
/* don't block to do this */
/* tnc might have been moved during race condition, */
- /* but it's always in a legit hash chain when a lock is granted,
- * or else it's on the freelist so prev == NULL,
+ /* but it's always in a legit hash chain when a lock is granted,
+ * or else it's on the freelist so prev == NULL,
* so at worst this is redundant */
- /* Now that we've got it held, and a lock on the dnlc, we
- * should check to be sure that there was no race, and
+ /* Now that we've got it held, and a lock on the dnlc, we
+ * should check to be sure that there was no race, and
* bail out if there was. */
if (tnc->prev) {
/* special case for only two elements on list - relative ordering
return 0;
}
-/*!
+/*!
* Remove anything pertaining to this directory. I can invalidate
* things without the lock, since I am just looking through the array,
* but to move things off the lists or into the freelist, I need the
- * write lock
+ * write lock
*
* \param adp vcache entry for the directory to be purged.
* \return 0
return 0;
}
-/*!
- * Remove anything pertaining to this file
+/*!
+ * Remove anything pertaining to this file
*
* \param File vcache entry.
* \return 0
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct nc *next, *prev;
struct vcache *dirp, *vp;
unsigned char name[AFSNCNAMESIZE];
- /* I think that we can avoid wasting a byte for NULL, with a
+ /* I think that we can avoid wasting a byte for NULL, with a
* a little bit of thought.
*/
};
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
DECL_PIOCTL(PDiscon);
DECL_PIOCTL(PNFSNukeCreds);
DECL_PIOCTL(PNewUuid);
-DECL_PIOCTL(PPrecache);
+DECL_PIOCTL(PPrecache);
DECL_PIOCTL(PGetPAG);
#if defined(AFS_CACHE_BYPASS)
DECL_PIOCTL(PSetCachingThreshold);
int arg;
};
-int
+int
afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp)
{
struct file *fd;
int
#ifdef AFS_SUN5_ENV
-afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
rval_t *vvp, afs_ucred_t *credp)
#else
#ifdef AFS_DARWIN100_ENV
afs_syscall64_pioctl(user_addr_t path, unsigned int com, user_addr_t cmarg,
int follow, afs_ucred_t *credp)
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
+afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow,
afs_ucred_t *credp)
#else
afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, int follow)
struct vnode *realvp;
if
#ifdef AFS_SUN511_ENV
- (VOP_REALVP(vp, &realvp, NULL) == 0)
+ (VOP_REALVP(vp, &realvp, NULL) == 0)
#else
- (VOP_REALVP(vp, &realvp) == 0)
+ (VOP_REALVP(vp, &realvp) == 0)
#endif
{
struct vnode *oldvp = vp;
-
+
VN_HOLD(realvp);
vp = realvp;
AFS_RELE(oldvp);
/*!
* VIOCGETTOK (8) - Get authentication tokens
- *
+ *
* \ingroup pioctl
- *
+ *
* \param[in] ain cellid to return tokens for
* \param[out] aout token
- *
+ *
* \retval EIO
* Error if the afs daemon hasn't started yet
* \retval EDOM
* tokens
* \retval ENOTCONN
* Error if there aren't tokens for this cell
- *
+ *
* \post
* If the input paramater exists, get the token that corresponds to
* the parameter value, if there is no token at this value, get the
afs_int32 flags;
struct dcache * tdc;
int i, size;
-
+
AFS_STATCNT(PGetCacheSize);
if (afs_pd_remaining(ain) == sizeof(afs_int32)) {
} else {
return EINVAL;
}
-
+
memset(results, 0, sizeof(results));
results[0] = afs_cacheBlocks;
results[1] = afs_blocksUsed;
results[2] = afs_cacheFiles;
-
+
if (1 == flags){
for (i = 0; i < afs_cacheFiles; i++) {
if (afs_indexFlags[i] & IFFree) results[3]++;
* then someone probably has the file open and is writing
* into it. Better to skip flushing such a file, it will be
* brought back immediately on the next write anyway.
- *
+ *
* If we *must* flush, then this code has to be rearranged
* to call afs_storeAllSegments() first */
afs_FlushDCache(tdc);
return 0;
}
-/*
+/*
* VIOC_SETPREFS33 (42) - Set server ranks (deprecated)
*
* \param[in] ain the server preferences to be set
return 0;
}
-/*
+/*
* VIOC_GETSPREFS (43) - Get server ranks
*
* \ingroup pioctl
} else if (!code) {
EXP_RELE(outexporter);
}
- if (!code)
+ if (!code)
*com = (*com) | comp;
return code;
}
#endif /* AFS_NEED_CLIENTCONTEXT */
-/*!
+/*!
* VIOC_GETCPREFS (50) - Get client interface
*
* \ingroup pioctl
if (tc) {
RX_AFS_GUNLOCK();
code =
- RXAFS_FsCmd(tc->id, Fid, Inputs,
+ RXAFS_FsCmd(tc->id, Fid, Inputs,
(struct FsCmdOutputs *)aout);
RX_AFS_GLOCK();
} else
if (setting == 0 && getting == 0)
return EINVAL;
-
- /*
+
+ /*
* If setting, set first, and return the value now in effect
*/
if (setting) {
if (!afs_osi_suser(*acred))
return EPERM;
cache_bypass_threshold = threshold;
- afs_warn("Cache Bypass Threshold set to: %d\n", threshold);
+ afs_warn("Cache Bypass Threshold set to: %d\n", threshold);
/* TODO: move to separate pioctl, or enhance pioctl */
cache_bypass_strategy = LARGE_FILES_BYPASS_CACHE;
}
-
+
/* Return the current size threshold */
if (getting)
return afs_pd_putInt(aout, cache_bypass_threshold);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern afs_rwlock_t afs_xcell;
extern afs_rwlock_t afsdb_client_lock;
extern afs_rwlock_t afsdb_req_lock;
-extern struct afs_q CellLRU;
+extern struct afs_q CellLRU;
extern void afs_CellInit(void);
extern void shutdown_cell(void);
extern int afs_wakeup(struct vcache *avc);
extern int afs_InitCacheFile(char *afile, ino_t ainode);
extern int afs_DCacheMissingChunks(struct vcache *avc);
-extern struct dcache *afs_ObtainDCacheForWriting(struct vcache *avc,
- afs_size_t filePos,
- afs_size_t len,
+extern struct dcache *afs_ObtainDCacheForWriting(struct vcache *avc,
+ afs_size_t filePos,
+ afs_size_t len,
struct vrequest *areq,
int noLock);
-extern void afs_PopulateDCache(struct vcache *avc, afs_size_t apos,
+extern void afs_PopulateDCache(struct vcache *avc, afs_size_t apos,
struct vrequest *areq);
/* afs_disconnected.c */
#else
extern int afs_setpag(void);
#endif
-
+
extern afs_uint32 genpag(void);
extern afs_uint32 getpag(void);
#if defined(AFS_FBSD_ENV)
/* ARCH/osi_inode.c */
#ifdef AFS_SUN5_ENV
-extern int afs_syscall_icreate(dev_t, long, long, long, long, long,
+extern int afs_syscall_icreate(dev_t, long, long, long, long, long,
rval_t *, afs_ucred_t *);
extern int afs_syscall_iopen(dev_t, int, int, rval_t *, afs_ucred_t *);
-extern int afs_syscall_iincdec(dev_t, int, int, int, rval_t *,
+extern int afs_syscall_iincdec(dev_t, int, int, int, rval_t *,
afs_ucred_t *);
#elif defined(AFS_SGI65_ENV)
extern int afs_syscall_icreate(afs_uint32, afs_uint32, afs_uint32, afs_uint32, afs_uint32, afs_uint32, rval_t *);
afs_ucred_t *credp);
#endif
#ifdef AFS_SUN5_ENV
-extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
int follow, rval_t *rvp, afs_ucred_t *credp);
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
+extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
int follow, afs_ucred_t *credp);
#else
extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg,
/* VNOPS/afs_vnop_dirops.c */
-extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
+extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs,
struct vcache **avcp, afs_ucred_t *acred);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp,
+extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp,
afs_ucred_t *acred);
#else
extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred);
/* VNOPS/afs_vnop_link.c */
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-extern int afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname,
+extern int afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname,
afs_ucred_t *acred);
#else
-extern int afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
+extern int afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname,
afs_ucred_t *acred);
#endif
struct vrequest *areqp);
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
- struct pathname *pnp, int flags, struct vnode *rdir,
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+ struct pathname *pnp, int flags, struct vnode *rdir,
afs_ucred_t *acred);
#elif defined(UKERNEL)
-extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
afs_ucred_t *acred, int flags);
#else
-extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
+extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp,
afs_ucred_t *acred);
#endif
-
+
/* VNOPS/afs_vnop_open.c */
#ifdef AFS_SGI64_ENV
extern int afs_open(bhv_desc_t * bhv, struct vcache **avcp, afs_int32 aflags,
/* VNOPS/afs_vnop_readdir.c */
extern int afs_rd_stash_i;
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
+extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
afs_ucred_t *acred, int *eofp);
#elif defined(AFS_HPUX100_ENV)
-extern int afs_readdir2(OSI_VC_DECL(avc), struct uio *auio,
+extern int afs_readdir2(OSI_VC_DECL(avc), struct uio *auio,
afs_ucred_t *acred);
#else
-extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
+extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
afs_ucred_t *acred);
#endif
char *aname2, afs_ucred_t *acred,
struct vrequest *areq);
#ifdef AFS_SGI_ENV
-extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
- char *aname2, struct pathname *npnp,
+extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
+ char *aname2, struct pathname *npnp,
afs_ucred_t *acred);
#else
-extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
+extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp,
char *aname2, afs_ucred_t *acred);
#endif
-
+
/* VNOPS/afs_vnop_strategy.c */
#if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int afs_ustrategy(struct buf *adp, afs_ucred_t *credp);
struct vrequest *areq);
extern int afs_UFSHandleLink(struct vcache *avc,
struct vrequest *areq);
-extern int afs_symlink(OSI_VC_DECL(adp), char *aname,
- struct vattr *attrs, char *atargetName,
+extern int afs_symlink(OSI_VC_DECL(adp), char *aname,
+ struct vattr *attrs, char *atargetName,
afs_ucred_t *acred);
extern int afs_readlink(OSI_VC_DECL(avc), struct uio *auio,
afs_ucred_t *acred);
extern int afs_closex(struct file *afd);
#ifdef AFS_SGI65_ENV
-extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
lastclose_t lastclose, afs_ucred_t *acred);
#elif defined(AFS_SGI64_ENV)
-extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
- lastclose_t lastclose, off_t offset,
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+ lastclose_t lastclose, off_t offset,
afs_ucred_t *acred, struct flid *flp);
#elif defined(AFS_SGI_ENV)
-extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
lastclose_t lastclose, off_t offset,
afs_ucred_t *acred);
#elif defined(AFS_SUN5_ENV)
-extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count,
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count,
offset_t offset, afs_ucred_t *acred);
#else
-extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
+extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags,
afs_ucred_t *acred);
#endif
#if defined(AFS_SGI65_ENV)
-extern int afs_fsync(OSI_VC_DECL(avc), int flags, afs_ucred_t *acred,
+extern int afs_fsync(OSI_VC_DECL(avc), int flags, afs_ucred_t *acred,
off_t start, off_t stop);
#elif defined(AFS_SGI_ENV) || defined(AFS_SUN53_ENV)
extern int afs_fsync(OSI_VC_DECL(avc), int flag, afs_ucred_t *acred);
#else
extern int afs_fsync(OSI_VC_DECL(avc), afs_ucred_t *acred);
#endif
-
+
/* afs_volume.c */
extern afs_int32 afs_FVIndex;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* - Have to get a write lock on xdcache because GetDSlot might need it (if
* the chunk doesn't have a dcache struct).
* This seems like overkill in most cases.
- * - I'm not sure that it's safe to do "index = .hvNextp", then unlock
+ * - I'm not sure that it's safe to do "index = .hvNextp", then unlock
* xdcache, then relock xdcache and try to use index. It is done
* a lot elsewhere in the CM, but I'm not buying that argument.
* - should be able to check IFDataMod without doing the GetDSlot (just
* hold afs_xdcache). That way, it's easy to do this without the
* writelock on afs_xdcache, and we save unneccessary disk
- * operations. I don't think that works, 'cuz the next pointers
+ * operations. I don't think that works, 'cuz the next pointers
* are still on disk.
*/
origCBs = afs_allCBs;
high = 0;
moredata = FALSE;
- /* lock and start over from beginning of hash chain
+ /* lock and start over from beginning of hash chain
* in order to avoid a race condition. */
ObtainWriteLock(&afs_xdcache, 284);
index = afs_dvhashTbl[hash];
* Call StoreMini if we haven't written enough data to extend the
* file at the fileserver to the client's notion of the file length.
*/
- if ((avc->f.truncPos != AFS_NOTRUNC)
+ if ((avc->f.truncPos != AFS_NOTRUNC)
|| ((avc->f.states & CExtendedFile)
&& (maxStoredLength < avc->f.m.Length))) {
code = afs_StoreMini(avc, areq);
/*
* Finally, turn off DWriting, turn on DFEntryMod,
* update f.versionNo.
- * A lot of this could be integrated into the loop above
+ * A lot of this could be integrated into the loop above
*/
if (!code) {
afs_hyper_t h_unset;
return 0;
}
-/*!
- *
+/*!
+ *
* Extend a cache file
*
* \param avc pointer to vcache to extend data for
towrite = (avc->f.m.Length + toAdd) - tdc->validPos;
if (towrite > AFS_PAGESIZE) towrite = AFS_PAGESIZE;
- code = afs_CFileWrite(tfile,
- tdc->validPos - AFS_CHUNKTOBASE(tdc->f.chunk),
+ code = afs_CFileWrite(tfile,
+ tdc->validPos - AFS_CHUNKTOBASE(tdc->f.chunk),
zeros, towrite);
tdc->validPos += towrite;
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* afsi_SetServerIPRank
* afs_GetServer
* afs_ActivateServer
- *
+ *
*
* Local:
* HaveCallBacksFrom
* CheckVLServer
* afs_SortOneServer
* afs_SetServerPrefs
- *
+ *
*/
#include <afsconfig.h>
#include "afs/param.h"
return;
}
}
- /*
+ /*
* All ips are down we treat the whole server down
*/
a_serverP->flags |= SRVR_ISDOWN;
struct server *aserver = sa->server;
AFS_STATCNT(ServerDown);
- if (aserver->flags & SRVR_ISDOWN || sa->sa_flags & SRVADDR_ISDOWN)
+ if (aserver->flags & SRVR_ISDOWN || sa->sa_flags & SRVADDR_ISDOWN)
return 0;
afs_MarkServerUpOrDown(sa, SRVR_ISDOWN);
if (sa->sa_portal == aserver->cell->vlport)
/*
* Any further tallying for this record will only be done if it has
- * been activated.
+ * been activated.
*/
if ((currSrvP->flags & AFS_SERVER_FLAG_ACTIVATED)
&& currSrvP->addr && currSrvP->cell) {
struct srvAddr **addrs;
struct afs_conn **conns;
int nconns;
- struct rx_connection **rxconns;
+ struct rx_connection **rxconns;
afs_int32 *conntimer, *deltas, *results;
Capabilities *caps = NULL;
AFS_STATCNT(afs_CheckServers);
- /*
+ /*
* No sense in doing the server checks if we are running in disconnected
* mode
*/
if ((sa->sa_flags & SRVADDR_ISDOWN) || afs_HaveCallBacksFrom(sa->server)
|| (tc->srvr->server == afs_setTimeHost)) {
- conns[nconns]=tc;
+ conns[nconns]=tc;
rxconns[nconns]=tc->id;
if (sa->sa_flags & SRVADDR_ISDOWN) {
rx_SetConnDeadTime(tc->id, 3);
}
AFS_GLOCK();
}
-
+
for(i=0;i<nconns;i++){
tc = conns[i];
sa = tc->srvr;
-
+
if (( results[i] >= 0 ) && (sa->sa_flags & SRVADDR_ISDOWN) && (tc->srvr == sa)) {
/* server back up */
print_internet_address("afs: file server ", sa, " is back up", 2);
-
+
ObtainWriteLock(&afs_xserver, 244);
- ObtainWriteLock(&afs_xsrvAddr, 245);
+ ObtainWriteLock(&afs_xsrvAddr, 245);
afs_MarkServerUpOrDown(sa, 0);
ReleaseWriteLock(&afs_xsrvAddr);
ReleaseWriteLock(&afs_xserver);
-
+
if (afs_waitForeverCount) {
afs_osi_Wakeup(&afs_waitForever);
}
delta = deltas[i];
tc = conns[i];
sa = tc->srvr;
-
+
if ((tc->srvr->server == afs_setTimeHost ||
/* Sync only to a server in the local cell */
(afs_setTimeHost == (struct server *)0 &&
/* set the time */
char msgbuf[90]; /* strlen("afs: setting clock...") + slop */
delta = end - tv.tv_sec; /* how many secs fast we are */
-
+
afs_setTimeHost = tc->srvr->server;
/* see if clock has changed enough to make it worthwhile */
if (delta >= AFS_MINCHANGE || delta <= -AFS_MINCHANGE) {
if (delta > 0) {
strcpy(msgbuf, "afs: setting clock back ");
if (delta > AFS_MAXCHANGEBACK) {
- afs_strcat(msgbuf,
- afs_cv2string(&tbuffer[CVBS],
+ afs_strcat(msgbuf,
+ afs_cv2string(&tbuffer[CVBS],
AFS_MAXCHANGEBACK));
afs_strcat(msgbuf, " seconds (of ");
- afs_strcat(msgbuf,
- afs_cv2string(&tbuffer[CVBS],
- delta -
+ afs_strcat(msgbuf,
+ afs_cv2string(&tbuffer[CVBS],
+ delta -
AFS_MAXCHANGEBACK));
afs_strcat(msgbuf, ", via ");
- print_internet_address(msgbuf, sa,
+ print_internet_address(msgbuf, sa,
"); clock is still fast.",
0);
} else {
- afs_strcat(msgbuf,
+ afs_strcat(msgbuf,
afs_cv2string(&tbuffer[CVBS], delta));
afs_strcat(msgbuf, " seconds (via ");
print_internet_address(msgbuf, sa, ").", 0);
}
} else {
strcpy(msgbuf, "afs: setting clock ahead ");
- afs_strcat(msgbuf,
+ afs_strcat(msgbuf,
afs_cv2string(&tbuffer[CVBS], -delta));
afs_strcat(msgbuf, " seconds (via ");
print_internet_address(msgbuf, sa, ").", 0);
}
/* We're only going to set it once; why bother looping? */
- break;
+ break;
}
}
}
for (i = 0; i < nconns; i++) {
afs_PutConn(conns[i], SHARED_LOCK); /* done with it now */
}
-
+
afs_osi_Free(addrs, srvAddrCount * sizeof(*addrs));
afs_osi_Free(conns, j * sizeof(struct afs_conn *));
afs_osi_Free(rxconns, j * sizeof(struct rx_connection *));
afs_osi_Free(deltas, j * sizeof(afs_int32));
afs_osi_Free(results, j * sizeof(afs_int32));
afs_osi_Free(caps, j * sizeof(Capabilities));
-
+
} /*afs_CheckServers*/
/* Rules:
X = (aX + c) % m
- m is a power of two
+ m is a power of two
a % 8 is 5
a is 0.73m should be 0.01m .. 0.99m
c is more or less immaterial. 1 or a is suggested.
-
+
NB: LOW ORDER BITS are not very random. To get small random numbers,
- treat result as <1, with implied binary point, and multiply by
+ treat result as <1, with implied binary point, and multiply by
desired modulus.
NB: Has to be unsigned, since shifts on signed quantities may preserve
the sign bit.
*/
-/* added rxi_getaddr() to try to get as much initial randomness as
- possible, since at least one customer reboots ALL their clients
+/* added rxi_getaddr() to try to get as much initial randomness as
+ possible, since at least one customer reboots ALL their clients
simultaneously -- so osi_Time is bound to be the same on some of the
clients. This is probably OK, but I don't want to see too much of it.
*/
/* returns int 0..14 using the high bits of a pseudo-random number instead of
the low bits, as the low bits are "less random" than the high ones...
slight roundoff error exists, an excercise for the reader.
- need to multiply by something with lots of ones in it, so multiply by
+ need to multiply by something with lots of ones in it, so multiply by
8 or 16 is right out.
*/
int
} /*afs_SortServers */
/* afs_SetServerPrefs is rather system-dependent. It pokes around in kernel
- data structures to determine what the local IP addresses and subnet masks
+ data structures to determine what the local IP addresses and subnet masks
are in order to choose which server(s) are on the local subnet.
As I see it, there are several cases:
4. The server is on a different logical subnet or net than this host, but
this host is a 'metric 0 gateway' to it. Ie, two address-spaces share
one physical medium.
- 5. This host has a direct (point-to-point, ie, PPP or SLIP) link to the
+ 5. This host has a direct (point-to-point, ie, PPP or SLIP) link to the
server.
6. This host and the server are disjoint.
That is a rough order of preference. If a point-to-point link has a high
- metric, I'm assuming that it is a very slow link, and putting it at the
- bottom of the list (at least until RX works better over slow links). If
- its metric is 1, I'm assuming that it's relatively fast (T1) and putting
+ metric, I'm assuming that it is a very slow link, and putting it at the
+ bottom of the list (at least until RX works better over slow links). If
+ its metric is 1, I'm assuming that it's relatively fast (T1) and putting
it ahead of #6.
It's not easy to check for case #4, so I'm ignoring it for the time being.
BSD "if" code keeps track of some rough network statistics (cf 'netstat -i')
- That could be used to prefer certain servers fairly easily. Maybe some
+ That could be used to prefer certain servers fairly easily. Maybe some
other time...
NOTE: this code is very system-dependent, and very dependent on the TCP/IP
/*
* The IP addresses and ranks are determined by afsd (in user space) and
* passed into the kernel at startup time through the AFSOP_ADVISEADDR
- * system call. These are stored in the data structure
- * called 'afs_cb_interface'.
+ * system call. These are stored in the data structure
+ * called 'afs_cb_interface'.
*
* struct srvAddr *sa; remote server
* afs_int32 addr; one of my local addr in net order
}
}
}
-
+
rw_exit(&afsifinfo_lock);
#else
for (ill = (struct ill_s *)*addr /*ill_g_headp */ ; ill;
subnet = ipif->ipif_local_addr & ipif->ipif_net_mask;
subnetmask = ipif->ipif_net_mask;
/*
- * Generate the local net using the local address and
+ * Generate the local net using the local address and
* whate we know about Class A, B and C networks.
*/
if (IN_CLASSA(ipif->ipif_local_addr)) {
/* Add the orphaned server to the afs_servers[] hash chain.
* Its iphash does not matter since we never look up the server
- * in the afs_servers table by its ip address (only by uuid -
+ * in the afs_servers table by its ip address (only by uuid -
* which this has none).
*/
iphash = SHash(aserverp[k]);
ObtainReadLock(&afs_xserver);
ObtainWriteLock(&afs_xconn, 1001);
-
+
/*printf("Destroying connections ... ");*/
for (i = 0; i < NSERVERS; i++) {
for (ts = afs_servers[i]; ts; ts = nts) {
ReleaseWriteLock(&afs_xconn);
ReleaseReadLock(&afs_xserver);
-
+
}
void
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_uint32 cbloops;
afs_uint32 osiread_efaults;
afs_int32 cacheBlocksDiscarded; /*# cache blocks free but not truncated */
- afs_int32 cacheBucket0_Discarded;
- afs_int32 cacheBucket1_Discarded;
- afs_int32 cacheBucket2_Discarded;
+ afs_int32 cacheBucket0_Discarded;
+ afs_int32 cacheBucket1_Discarded;
+ afs_int32 cacheBucket2_Discarded;
/*
* Spares for future expansion.
* integer portion (this will be taken care of when we ensure that y'
* is less than 1000000).
*
- * The only other non-obvious calculation involves y^2. The key to
+ * The only other non-obvious calculation involves y^2. The key to
* understanding this part of the calculation is to expand y again
* in a nonobvious manner. We do this via the following expansion:
*
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int code;
#if defined(AFS_DARWIN100_ENV)
struct afs_ioctl32 dst32;
-
+
if (!proc_is64bit(current_proc())) {
AFS_COPYIN(cmarg, (caddr_t) & dst32, sizeof dst32, code);
if (!code)
#elif defined(AFS_PPC64_LINUX26_ENV)
#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
- if (current->thread_info->flags & _TIF_32BIT)
+ if (current->thread_info->flags & _TIF_32BIT)
#else
- if (task_thread_info(current)->flags & _TIF_32BIT)
-#endif
+ if (task_thread_info(current)->flags & _TIF_32BIT)
+#endif
#elif defined(AFS_PPC64_LINUX20_ENV)
if (current->thread.flags & PPC_FLAG_32BIT)
#elif defined(AFS_PPC64_LINUX26_ENV)
#if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
- if (current->thread_info->flags & _TIF_32BIT)
+ if (current->thread_info->flags & _TIF_32BIT)
#else
- if (task_thread_info(current)->flags & _TIF_32BIT)
-#endif
+ if (task_thread_info(current)->flags & _TIF_32BIT)
+#endif
#elif defined(AFS_PPC64_LINUX20_ENV)
- if (current->thread.flags & PPC_FLAG_32BIT)
+ if (current->thread.flags & PPC_FLAG_32BIT)
#elif defined(AFS_S390X_LINUX26_ENV)
if (test_thread_flag(TIF_31BIT))
#elif defined(AFS_S390X_LINUX20_ENV)
- if (current->thread.flags & S390_FLAG_31BIT)
+ if (current->thread.flags & S390_FLAG_31BIT)
#else
#error iparam32 not done for this linux platform
ec CM_TRACE_STOREALL, "StoreAll vp 0x%lx len (0x%x, 0x%x)"
ec CM_TRACE_INVALL, "InvalAll vp 0x%lx len 0x%x"
ec CM_TRACE_TRUNCALL, "TruncAll vp 0x%lx old len (0x%x, 0x%x) new len (0x%x, 0x%x)"
-
+
ec CM_TRACE_GNLINK, "Gn_link vp 0x%lx name %s (returns 0x%x)"
ec CM_TRACE_GMKDIR, "Gn_mkdir vp 0x%lx name %s mode 0x%x (returns 0x%x)"
ec CM_TRACE_GMKNOD, "Gn_mknod vp 0x%lx name %s mode 0x%x (returns 0x%x)"
ec CM_TRACE_STOREPROC2, "StoreProc got (0x%x, 0x%x) length 0x%x"
ec CM_TRACE_ADJUSTSIZE, "AdjustSize index %d oldSize %d newSize %d blocksUsed %d"
ec CM_TRACE_SETLENGTH, "%s line %d: m.Length was (0x%x, 0x%x), now (0x%x, 0x%x)"
- ec CM_TRACE_DCACHEWAIT, "%s line %d: waiting for 0x%x flags 0x%x"
- ec CM_TRACE_VNODEREAD, "UFSRead: tdc 0x%lx, offset (0x%x, 0x%x) len (0x%x 0x%x)"
- ec CM_TRACE_SLEEP, "Sleep: evp 0x%lx, count %d seq 0x%x evp->seq 0x%x"
+ ec CM_TRACE_DCACHEWAIT, "%s line %d: waiting for 0x%x flags 0x%x"
+ ec CM_TRACE_VNODEREAD, "UFSRead: tdc 0x%lx, offset (0x%x, 0x%x) len (0x%x 0x%x)"
+ ec CM_TRACE_SLEEP, "Sleep: evp 0x%lx, count %d seq 0x%x evp->seq 0x%x"
ec CM_TRACE_WAKE, "Wakeup: evp 0x%lx, evp->seq 0x%x"
ec CM_TRACE_DENTRYDELETE, "d_delete inode 0x%x d_name %s/%s"
ec CM_TRACE_DENTRYIPUT, "d_iput inode 0x%x d_name %s/%s"
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#if AFS_GCPAGS
/*
- * Called by osi_TraverseProcTable (from afs_GCPAGs) for each
+ * Called by osi_TraverseProcTable (from afs_GCPAGs) for each
* process in the system.
* If the specified process uses a PAG, clear that PAG's temporary
* 'deleteme' flag.
#endif
hash = UHash(uid);
- /* if this token is PAG based, or it's UID based and
+ /* if this token is PAG based, or it's UID based and
* UID-based tokens exist */
if ((pag != NOPAG) || (afs_GCPAGs_UIDBaseTokenCount)) {
/* find the entries for this uid in all cells and clear the not
* referenced flag. Can't use afs_FindUser, because it just returns
- * the specific cell asked for, or the first one found.
+ * the specific cell asked for, or the first one found.
*/
struct unixuser *pu;
for (pu = afs_users[hash]; pu; pu = pu->next) {
/* clear the 'deleteme' flag for this entry */
pu->states &= ~TMP_UPAGNotReferenced;
if (pag == NOPAG) {
- /* This is a uid based token that hadn't
+ /* This is a uid based token that hadn't
* previously been cleared, so decrement the
* outstanding uid based token count */
afs_GCPAGs_UIDBaseTokenCount--;
#endif
/*
- * Go through the process table, find all unused PAGs
+ * Go through the process table, find all unused PAGs
* and cause them to be deleted during the next GC.
*
* returns the number of PAGs marked for deletion
}
}
- /* Now, iterate through the systems process table,
+ /* Now, iterate through the systems process table,
* for each process, mark it's PAGs (if any) in use.
* i.e. clear the temporary deleteme flag.
*/
* i.e. nfs translator, etc.
*/
if (!pu->exporter && afs_gcpags == AFS_GCPAGS_OK) {
- /* set the expire times to 0, causes
- * afs_GCUserData to remove this entry
+ /* set the expire times to 0, causes
+ * afs_GCUserData to remove this entry
*/
pu->ct.EndTimestamp = 0;
pu->tokenTime = 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_strrchr(char *s, int c)
{
char *p = NULL;
-
+
do {
if (*s == c)
p = (char*) s;
afs_int32
afs_calc_inum(afs_int32 volume, afs_int32 vnode)
-{
+{
afs_int32 ino, vno = vnode;
char digest[16];
struct afs_md5 ct;
-
+
if (afs_new_inum) {
AFS_MD5_Init(&ct);
AFS_MD5_Update(&ct, &volume, 4);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int afs_norefpanic = 0;
-/* Disk backed vcache definitions
+/* Disk backed vcache definitions
* Both protected by xvcache */
static int afs_nextVcacheSlot = 0;
static struct afs_slotlist *afs_freeSlotList = NULL;
/*!
* Generate an index into the hash table for a given Fid.
- * \param fid
+ * \param fid
* \return The hash value.
*/
static int
/*!
* The core of the inactive vnode op for all but IRIX.
*
- * \param avc
+ * \param avc
* \param acred
*/
void
ReleaseWriteLock(&afs_xvcb);
}
-void
+void
afs_FlushReclaimedVcaches(void)
{
#if !defined(AFS_LINUX22_ENV)
struct vcache *tvc;
int code, fv_slept;
- struct vcache *tmpReclaimedVCList = NULL;
+ struct vcache *tmpReclaimedVCList = NULL;
ObtainWriteLock(&afs_xvreclaim, 76);
while (ReclaimedVCList) {
afs_osi_Wakeup(&tvc->f.states);
}
}
- if (tmpReclaimedVCList)
+ if (tmpReclaimedVCList)
ReclaimedVCList = tmpReclaimedVCList;
ReleaseWriteLock(&afs_xvreclaim);
/* Alloc new vnode. */
static struct vcache *
-afs_AllocVCache(void)
+afs_AllocVCache(void)
{
struct vcache *tvc;
*/
if (afs_freeSlotList != NULL) {
struct afs_slotlist *tmp;
-
+
tvc->diskSlot = afs_freeSlotList->slot;
tmp = afs_freeSlotList;
afs_freeSlotList = tmp->next;
tvc->hnext = afs_vhashT[i];
afs_vhashT[i] = tvc;
QAdd(&afs_vhashTV[j], &tvc->vhashq);
-
+
if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
refpanic("NewVCache VLRU inconsistent");
}
*/
/*!
- *
+ *
* Make sure a cache entry is up-to-date status-wise.
- *
+ *
* NOTE: everywhere that calls this can potentially be sped up
* by checking CStatd first, and avoiding doing the InitReq
* if this is up-to-date.
* Copy astat block into vcache info
*
* \note This code may get dataversion and length out of sync if the file has
- * been modified. This is less than ideal. I haven't thought about it sufficiently
+ * been modified. This is less than ideal. I haven't thought about it sufficiently
* to be certain that it is adequate.
*
* \note Environment: Must be called under a write lock
/*!
* Get fid from server.
*
- * \param afid
+ * \param afid
* \param areq Request to be passed on.
* \param name Name of ?? to lookup.
* \param OutStatus Fetch status.
- * \param CallBackp
+ * \param CallBackp
* \param serverp
* \param tsyncp
*
struct AFSFetchStatus OutDirStatus;
XSTATS_DECLS;
if (!name)
- name = ""; /* XXX */
+ name = ""; /* XXX */
do {
tc = afs_Conn(afid, areq, SHARED_LOCK);
if (tc) {
* of a parent dir cache entry, given a file (to check its access
* control list). It also allows renames to be handled easily by
* locking directories in a constant order.
- *
+ *
* \note NB. NewVCache -> FlushVCache presently (4/10/95) drops the xvcache lock.
*
* \note Might have a vcache structure already, which must
- * already be held by the caller
+ * already be held by the caller
*/
struct vcache *
afs_GetVCache(struct VenusFid *afid, struct vrequest *areq,
if (!iheldthelock)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, current_proc());
/* this is messy. we can call fsync which will try to reobtain this */
- if (VTOAFS(vp) == tvc)
+ if (VTOAFS(vp) == tvc)
ReleaseWriteLock(&tvc->lock);
if (UBCINFOEXISTS(vp)) {
vinvalbuf(vp, V_SAVE, &afs_osi_cred, current_proc(), PINOD, 0);
}
- if (VTOAFS(vp) == tvc)
+ if (VTOAFS(vp) == tvc)
ObtainWriteLock(&tvc->lock, 954);
if (!iheldthelock)
VOP_UNLOCK(vp, LK_EXCLUSIVE, current_proc());
* Lookup a vcache by fid. Look inside the cache first, if not
* there, lookup the file on the server, and then get it's fresh
* cache entry.
- *
+ *
* \param afid
- * \param areq
+ * \param areq
* \param cached Is element cached? If NULL, don't answer.
* \param adp
* \param aname
nfid = *afid;
now = osi_Time();
origCBs = afs_allCBs; /* if anything changes, we don't have a cb */
-
+
if (AFS_IS_DISCONNECTED) {
/* printf("Network is down in afs_LookupVcache\n"); */
code = ENETDOWN;
- } else
+ } else
code =
- afs_RemoteLookup(&adp->f.fid, areq, aname, &nfid, &OutStatus,
+ afs_RemoteLookup(&adp->f.fid, areq, aname, &nfid, &OutStatus,
&CallBack, &serverp, &tsync);
#if defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
/*!
* Reset a vcache entry, so local contents are ignored, and the
* server will be reconsulted next time the vcache is used
- *
+ *
* \param avc Pointer to the cache entry to reset
- * \param acred
+ * \param acred
*
* \note avc must be write locked on entry
*/
* \param vcache Enter sleep state.
* \param flag Determines what locks to use.
*
- * \return
+ * \return
*/
static void
findvc_sleep(struct vcache *avc, int flag)
int i;
struct vcache *tvc;
int nq=0;
-
+
ObtainWriteLock(&afs_xvcache, 1002); /* XXX - should be a unique number */
-
+
/* Somehow, walk the set of vcaches, with each one coming out as tvc */
for (i = 0; i < VCSIZE; i++) {
for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
*
* Clear the Statd flag from all vcaches
*
- * This function removes the Statd flag from all vcaches. It's used by
+ * This function removes the Statd flag from all vcaches. It's used by
* disconnected mode to tidy up during reconnection
*
*/
{
int i;
struct vcache *tvc;
-
+
ObtainWriteLock(&afs_xvcache, 715);
for (i = 0; i < VCSIZE; i++) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/**
- * Convert a volume name to a number;
+ * Convert a volume name to a number;
* @param aname Volume name.
* @return return 0 if can't parse as a number.
*/
static struct fvolume staticFVolume;
afs_int32 afs_FVIndex = -1;
-/**
- * UFS specific version of afs_GetVolSlot
+/**
+ * UFS specific version of afs_GetVolSlot
* @return
*/
struct volume *
/**
- * Get an available volume list slot. If the list does not exist,
+ * Get an available volume list slot. If the list does not exist,
* create one containing a single element.
- * @return
+ * @return
*/
struct volume *
afs_MemGetVolSlot(void)
} /*afs_MemGetVolSlot */
-/**
+/**
* Reset volume information for all volume structs that
* point to a speicific server.
* @param srvp
}
-/**
+/**
* Reset volume name to volume id mapping cache.
* @param flags
*/
/* afs_PutVolume is now a macro in afs.h */
-/**
+/**
* Return volume struct if we have it cached and it's up-to-date.
* Environment: Must be called with afs_xvolume unlocked.
* @param afid Volume FID.
/**
- *
+ *
* @param volid Volume ID. If it's 0, get it from the name.
* @param aname Volume name.
* @param ve Volume entry.
* @param tcell The cell containing this volume.
- * @param agood
+ * @param agood
* @param type Type of volume.
* @param areq Request.
* @return Volume or NULL if failure.
volid = nve->volumeId[whichType];
} else {
volid = ove->volumeId[whichType];
- }
+ }
} /* end of if (volid == 0) */
} /* end of if (!volid) */
* Seek volume by it's name and attributes.
* If volume not found, try to add one.
* @param aname Volume name.
- * @param acell Cell
+ * @param acell Cell
* @param agood
* @param areq
* @param locktype Type of lock to be used.
- * @return
+ * @return
*/
struct volume *
afs_GetVolumeByName(char *aname, afs_int32 acell, int agood,
/**
* Init a new dynroot volume.
- * @param Volume FID.
+ * @param Volume FID.
* @return Volume or NULL if not found.
*/
static struct volume *
/**
* @param aname Volume name.
* @param acell Cell id.
- * @param agood
+ * @param agood
* @param areq Request type.
* @param locktype Type of lock to be used.
* @return Volume or NULL if failure.
-/**
+/**
* Call this with the volume structure locked; used for new-style vldb requests.
- * @param av Volume
+ * @param av Volume
* @param ve
* @param acell
*/
cellp = afs_GetCell(acell, 0);
- /* This volume, av, is locked. Zero out the serverHosts[] array
- * so that if afs_GetServer() decides to replace the server
+ /* This volume, av, is locked. Zero out the serverHosts[] array
+ * so that if afs_GetServer() decides to replace the server
* struct, we don't deadlock trying to afs_ResetVolumeInfo()
* this volume.
*/
cellp = afs_GetCell(acell, 0);
- /* This volume, av, is locked. Zero out the serverHosts[] array
- * so that if afs_GetServer() decides to replace the server
+ /* This volume, av, is locked. Zero out the serverHosts[] array
+ * so that if afs_GetServer() decides to replace the server
* struct, we don't deadlock trying to afs_ResetVolumeInfo()
* this volume.
*/
cellp = afs_GetCell(acell, 0);
- /* This volume, av, is locked. Zero out the serverHosts[] array
- * so that if afs_GetServer() decides to replace the server
+ /* This volume, av, is locked. Zero out the serverHosts[] array
+ * so that if afs_GetServer() decides to replace the server
* struct, we don't deadlock trying to afs_ResetVolumeInfo()
* this volume.
*/
/**
- * Reset volume info for the specified volume strecture. Mark volume
+ * Reset volume info for the specified volume strecture. Mark volume
* to be rechecked next time.
- * @param tv
+ * @param tv
*/
void
afs_ResetVolumeInfo(struct volume *tv)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern int afs_ResyncDisconFiles(struct vrequest *areq,
afs_ucred_t *acred);
extern void afs_RemoveAllConns(void);
-extern void afs_GenFakeFid(struct VenusFid *afid, afs_uint32 avtype,
+extern void afs_GenFakeFid(struct VenusFid *afid, afs_uint32 avtype,
int lock);
extern void afs_GenShadowFid(struct VenusFid *afid);
extern void afs_GenDisconStatus(struct vcache *adp,
/* Call with avc lock held */
static_inline void afs_DisconAddDirty(struct vcache *avc, int operation, int lock) {
if (!avc->f.ddirty_flags) {
- if (lock)
+ if (lock)
ObtainWriteLock(&afs_xvcache, 702);
ObtainWriteLock(&afs_disconDirtyLock, 703);
QAdd(&afs_disconDirty, &avc->dirtyq);
ReleaseWriteLock(&afs_xvcache);
}
avc->f.ddirty_flags |= operation;
-}
+}
/* Call with avc lock held */
static_inline void afs_DisconRemoveDirty(struct vcache *avc) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
unsigned short spare; /* not used now */
osi_timeval_t time_waiting; /* for statistics gathering */
#if defined(INSTRUMENT_LOCKS)
- /* the following are useful for debugging
+ /* the following are useful for debugging
** the field 'src_indicator' is updated only by ObtainLock() and
** only for writes/shared locks. Hence, it indictes where in the
** source code the shared/write lock was set.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define VSALVAGE 101 /* Volume needs salvage */
#define VNOVNODE 102 /* Bad vnode number quoted */
-#define VNOVOL 103 /* Volume not attached, doesn't exist,
+#define VNOVOL 103 /* Volume not attached, doesn't exist,
* not created or not online */
#define VVOLEXISTS 104 /* Volume already exists */
#define VNOSERVICE 105 /* Volume is not in service (i.e. it's
#define VMOVED 111 /* Volume has moved to another server; do a VGetVolumeInfo
* to THIS server to find out where */
-#define VRESTARTING -100 /* server is restarting, otherwise similar to
+#define VRESTARTING -100 /* server is restarting, otherwise similar to
* VBUSY above. This is negative so that old
* cache managers treat it as "server is down" */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* -rxmaxmtu Set the max mtu to help with VPN issues.
* -verbose Be chatty.
* -disable-dynamic-vcaches Disable the use of -stat value as the starting size of
- * the size of the vcache/stat cache pool,
+ * the size of the vcache/stat cache pool,
* but increase that pool dynamically as needed.
* -debug Print out additional debugging info.
* -kerndev [OBSOLETE] The kernel device for AFS.
* -dontfork [OBSOLETE] Don't fork off as a new process.
* -daemons The number of background daemons to start (Default: 2).
* -rmtsys Also fires up an afs remote sys call (e.g. pioctl, setpag)
- * support daemon
+ * support daemon
* -chunksize [n] 2^n is the chunksize to be used. 0 is default.
* -dcache The number of data cache entries.
* -biods Number of bkg I/O daemons (AIX3.1 only)
#if defined(AFS_DARWIN_ENV) && !defined(AFS_ARM_DARWIN_ENV)
static void
-afsd_sleep_callback(void * refCon, io_service_t service,
+afsd_sleep_callback(void * refCon, io_service_t service,
natural_t messageType, void * messageArgument )
{
switch (messageType) {
case kIOMessageCanSystemSleep:
- /* Idle sleep is about to kick in; can
- prevent sleep by calling IOCancelPowerChange, otherwise
+ /* Idle sleep is about to kick in; can
+ prevent sleep by calling IOCancelPowerChange, otherwise
if we don't ack in 30s the system sleeps anyway */
-
+
/* allow it */
IOAllowPowerChange(root_port, (long)messageArgument);
break;
-
+
case kIOMessageSystemWillSleep:
/* The system WILL go to sleep. Ack or suffer delay */
-
+
IOAllowPowerChange(root_port, (long)messageArgument);
break;
-
+
case kIOMessageSystemWillRestart:
/* The system WILL restart. Ack or suffer delay */
-
+
IOAllowPowerChange(root_port, (long)messageArgument);
break;
-
+
case kIOMessageSystemWillPowerOn:
case kIOMessageSystemHasPoweredOn:
/* coming back from sleep */
-
+
IOAllowPowerChange(root_port, (long)messageArgument);
break;
-
+
default:
IOAllowPowerChange(root_port, (long)messageArgument);
break;
CFRelease (timer);
}
-static void
+static void
afsd_event_cleanup(int signo) {
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
#ifndef AFS_ARM_DARWIN_ENV
root_port = IORegisterForSystemPower(0,¬ify,afsd_sleep_callback,&iterator);
-
+
if (root_port) {
CFRunLoopAddSource(CFRunLoopGetCurrent(),
IONotificationPortGetRunLoopSource(notify),
kCFRunLoopDefaultMode);
}
-
-
+
+
store = SCDynamicStoreCreate (NULL,
CFSTR ("AddIPAddressListChangeCallbackSCF"),
afsd_ipaddr_callback, &ctx);
-
+
if (store) {
const void *keys[1];
-
+
/* Request IPV4 address change notification */
keys[0] = (SCDynamicStoreKeyCreateNetworkServiceEntity
(NULL, kSCDynamicStoreDomainState,
kSCCompAnyRegex, kSCEntNetIPv4));
-
+
#if 0
/* This should tell us when the hostname(s) change. do we care? */
keys[N] = SCDynamicStoreKeyCreateHostNames (NULL);
#endif
-
+
if (keys[0] != NULL) {
CFArrayRef pattern_array;
-
+
pattern_array = CFArrayCreate (NULL, keys, 1,
&kCFTypeArrayCallBacks);
-
+
if (pattern_array != NULL)
{
SCDynamicStoreSetNotificationKeys (store, NULL, pattern_array);
source = SCDynamicStoreCreateRunLoopSource (NULL, store, 0);
-
+
CFRelease (pattern_array);
}
-
+
if (keys[0] != NULL)
CFRelease (keys[0]);
}
-
- CFRelease (store);
+
+ CFRelease (store);
}
#endif
-
+
if (source != NULL) {
CFRunLoopAddSource (CFRunLoopGetCurrent(),
source, kCFRunLoopDefaultMode);
}
-
+
signal(SIGTERM, afsd_event_cleanup);
CFRunLoopRun();
}
/*
- * All failures to open the partition are ignored. Also if the cache dir
- * isn't a mounted partition it's also ignored since we can't guarantee
+ * All failures to open the partition are ignored. Also if the cache dir
+ * isn't a mounted partition it's also ignored since we can't guarantee
* what will be stored afterwards. Too many if's. This is now purely
* advisory. ODS with over 2G partition also gives warning message.
*
}
static int
-MoveCacheFile(char *basename, int fromDir, int toDir, int cacheFile,
+MoveCacheFile(char *basename, int fromDir, int toDir, int cacheFile,
int maxDir)
{
static char rn[] = "MoveCacheFile";
static int
-doSweepAFSCache(int *vFilesFound,
+doSweepAFSCache(int *vFilesFound,
char *directory, /* /path/to/cache/directory */
int dirNum, /* current directory number */
int maxDir) /* maximum directory number */
if (as->parms[20].items) {
/* -shutdown */
afs_shutdown = 1;
- /*
+ /*
* Cold shutdown is the default
*/
printf("afsd: Shutting down all afs processes and afs state\n");
/* Disk cache:
* Compute the number of cache files based on cache size,
* but only if -files isn't given on the command line.
- * Don't let # files be so small as to prevent full utilization
+ * Don't let # files be so small as to prevent full utilization
* of the cache unless user has explicitly asked for it.
*/
if (chunkSize == 0) {
cacheFiles = max(cacheFiles, 1000);
- /* Always allow more files than chunks. Presume average V-file
+ /* Always allow more files than chunks. Presume average V-file
* is ~67% of a chunk... (another guess, perhaps Honeyman will
* have a grad student write a paper). i is KILOBYTES.
*/
/* This actually needs to
1) use powers of 2
2) not second-guess when a chunksize comes from the command line
- 3) be less, um, small. 2^2??
+ 3) be less, um, small. 2^2??
*/
/* Sanity check chunkSize */
i = max(cacheBlocks / 1000, cacheBlocks / cacheFiles);
printf("%s: Using memory cache, not swept\n", rn);
/*
- * Pass the kernel the name of the workstation cache file holding the
+ * Pass the kernel the name of the workstation cache file holding the
* dcache entries.
*/
if (afsd_debug)
afsd_call_syscall(AFSOP_GO, cacheSetTime);
/*
- * At this point, we have finished passing the kernel all the info
+ * At this point, we have finished passing the kernel all the info
* it needs to set up the AFS. Mount the AFS root.
*/
printf("%s: All AFS daemons started.\n", rn);
"set rx_extraPackets to this value");
cmd_AddParm(ts, "-splitcache", CMD_SINGLE, CMD_OPTIONAL,
"Percentage RW versus RO in cache (specify as 60/40)");
- cmd_AddParm(ts, "-disable-dynamic-vcaches", CMD_FLAG, CMD_OPTIONAL,
+ cmd_AddParm(ts, "-disable-dynamic-vcaches", CMD_FLAG, CMD_OPTIONAL,
"disable stat/vcache cache growing as needed");
cmd_AddParm(ts, "-rxmaxmtu", CMD_SINGLE, CMD_OPTIONAL, "set rx max MTU to use");
cmd_AddParm(ts, "-dynroot-sparse", CMD_FLAG, CMD_OPTIONAL,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "AFS_component_version_number.c"
-int
+int
main(int argc, char **argv)
{
afs_int32 code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
- Include file for the afsmonitor
+ Include file for the afsmonitor
This file defines the following arrays:
fs_varNames - file server variable names
fs_labels - file server column label names (fs_varNames split into
atmost 3 parts)
- fs_categories - names of sections & groups into which file server
+ fs_categories - names of sections & groups into which file server
variables are categorized.
cm_varNames - cache manager variable names
cm_labels - cache manager column label names (cm_varNames split into
atmost 3 parts)
- cm_categories - names of sections & groups into which cache manager
+ cm_categories - names of sections & groups into which cache manager
variables are categorized.
-------------------------------------------------------------------------*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
};
/*________________________________________________________________________
- FS STATS ROUTINES
+ FS STATS ROUTINES
*_______________________________________________________________________*/
/*------------------------------------------------------------------------
* afsmon_fsOutput()
*
* Description:
- * Prints the contents of xstat_fs_Results to an output file. The
+ * Prints the contents of xstat_fs_Results to an output file. The
* output is either in a compact (longs only) format or a detailed
* format giving the names of each of the datums. Output is appended.
*
*------------------------------------------------------------------------*/
void
-Print_cm_XferTiming(int a_opIdx, char *a_opNames[],
+Print_cm_XferTiming(int a_opIdx, char *a_opNames[],
struct afs_stats_xferData *a_xferP)
{ /*Print_cm_XferTiming */
* afsmon_cmOutput()
*
* Description:
- * Prints the contents of xstat_cm_Results to an output file. The
+ * Prints the contents of xstat_cm_Results to an output file. The
* output is either in a compact (longs only) format or a detailed
* format giving the names of each of the datums. Output is appended.
*
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* switch) and print it in a readable form. It does not make any statistical
* analysis of the data.
*
- * Most of the code here is cloned from afsmon-output.c. It is made as a
+ * Most of the code here is cloned from afsmon-output.c. It is made as a
* separate file so that it can be independently given to customers.
*
*-------------------------------------------------------------------------*/
};
/*________________________________________________________________________
- FS STATS ROUTINES
+ FS STATS ROUTINES
*_______________________________________________________________________*/
/*------------------------------------------------------------------------
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*------------------------------------------------------------------------*/
int
-justify_light(char *a_srcbuff, char *a_dstbuff, int a_dstwidth,
+justify_light(char *a_srcbuff, char *a_dstbuff, int a_dstwidth,
int a_justification, int a_rightTrunc)
{ /*justify_light */
* we automatically shorten up.
*/
if (a_dstwidth > GATOR_LABEL_CHARS) {
- /*
+ /*
* if (afsmon_debug) {
* fprintf(debugFD,
* "[%s] Dest width (%d) > gtx buflen (%d), shrinking dest width\n",
*
* Description:
* Call the exit routine. This function is mapped
- * to the keys Q and \ 3 in all the frames and is called by the
+ * to the keys Q and \ 3 in all the frames and is called by the
* gtx input server.
*----------------------------------------------------------------------*/
ovw_refresh(int a_pageNum, /* page to refresh overview display */
int a_updateType) /* OVW_UPDATE_FS = update fs column only,
* OVW_UPDATE_CM = update cm column only,
- * OVW_UPDATE_BOTH = update fs & cm columns. Note that
- * we do not want to update a column until the
+ * OVW_UPDATE_BOTH = update fs & cm columns. Note that
+ * we do not want to update a column until the
* corresponding probe cycle has completed */
{ /* ovw_refresh */
fflush(debugFD);
}
- /* if the data is not yet available ie., not one probe cycle has
+ /* if the data is not yet available ie., not one probe cycle has
* completed, do nothing */
if ((a_updateType & OVW_UPDATE_FS) && !fs_Data_Available)
* The data in the file server & cache manager frames are displayed
* in two objects, one below the other. If the data is too long to
* fit in the first object it will overflow into the next. This is
- * to conserve real estate on the screen. This function copies the
+ * to conserve real estate on the screen. This function copies the
* contents of the source buffer adjusted to the two objects if the
- * probe had succeded. Otherwise it enters "--" in the first object
+ * probe had succeded. Otherwise it enters "--" in the first object
* blanks out the second. If the object needs to be highlightned
* (due to a threshold crossing) it is done.
*
part[i][j] = '\0';
}
- /*
+ /*
* if (afsmon_debug) {
* fprintf(debugFD,"[ %s ] LABELS %s -> %s %s %s\n",
* rn, a_srcBuf, part[0], part[1], part[2]);
*
* Description:
* Refresh the File Servers screen with the given page number starting
- * at the given left-column number. The appropriate contents of
- * prev_fsData are displayed.
+ * at the given left-column number. The appropriate contents of
+ * prev_fsData are displayed.
* First the status labels at the four corners of the screen are
* updated. Next the column labels are updated and then each row
* of statistics.
- *
+ *
* Returns:
* Success: 0
* Failure: Exits afsmoitor on a severe error.
int code;
int fsIdx;
int labelIdx;
- int dataIndex; /* index to the data[] field of
+ int dataIndex; /* index to the data[] field of
* struct fs_Display_Data */
if (afsmon_debug) {
}
- /* if the data is not yet available, ie., not one probe cycle has
+ /* if the data is not yet available, ie., not one probe cycle has
* completed, do nothing */
if (!fs_Data_Available)
/* command line */
/* figure out what we need to show in the prompt & set the page type */
- /* the fs_pageType variable is in turn used by the keyboard handler
+ /* the fs_pageType variable is in turn used by the keyboard handler
* routines to call fs_refresh() with the correct parameters */
fs_pageType = resolve_CmdLine(cmdLine, 1 /* fs frame */ , a_pageNum,
* overflow flag is set and highlight if so. if the probe had failed
* enter "--" is all columns */
- /* each host has two rows of slots for datums. get the pointers to
+ /* each host has two rows of slots for datums. get the pointers to
* both the arrays */
firstSlot_o_Ptr = tmp_fs_lines_P->data_o[0];
* Switch_fs_2_cm()
*
* Description:
- * Switch from the File Server screen to the Cache Managers screen.
+ * Switch from the File Server screen to the Cache Managers screen.
*----------------------------------------------------------------------*/
int
Switch_fs_2_cm(void *d1, void *d2)
* Switch_fs_next()
*
* Description:
- * Switch to next page of file server screen
+ * Switch to next page of file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_next(void *d1, void *d2)
* Switch_fs_last()
*
* Description:
- * Switch to last page of file server screen
+ * Switch to last page of file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_last(void *d1, void *d2)
* Switch_fs_prev()
*
* Description:
- * Switch to previous page of file server screen
+ * Switch to previous page of file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_prev(void *d1, void *d2)
* Switch_fs_first()
*
* Description:
- * Switch to first page of file server screen
+ * Switch to first page of file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_first(void *d1, void *d2)
* Switch_fs_left()
*
* Description:
- * Scroll left on the file server screen
+ * Scroll left on the file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_left(void *d1, void *d2)
* Switch_fs_leftmost()
*
* Description:
- * Scroll to first column on the file server screen
+ * Scroll to first column on the file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_leftmost(void *d1, void *d2)
* Switch_fs_right()
*
* Description:
- * Scroll right on the file server screen
+ * Scroll right on the file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_right(void *d1, void *d2)
* Switch_fs_rightmost()
*
* Description:
- * Scroll to last column on the file server screen
+ * Scroll to last column on the file server screen
*----------------------------------------------------------------------*/
int
Switch_fs_rightmost(void *d1, void *d2)
afsmon_Exit(365);
}
- /* for each line of server statistics allocate memory to store two arrays
+ /* for each line of server statistics allocate memory to store two arrays
* of data onodes */
fs_lines_Ptr = fs_lines;
keymap_BindToString(fsFrame->keymap, "Q", afsmonExit_gtx, NULL, NULL);
keymap_BindToString(fsFrame->keymap, "\ 3", afsmonExit_gtx, NULL, NULL);
- /* o = overview, c = cm, n = next, p = prev, l = left, r = right
+ /* o = overview, c = cm, n = next, p = prev, l = left, r = right
* N = last page, P = first page, L = leftmost col, R = rightmost col */
keymap_BindToString(fsFrame->keymap, "o", Switch_fs_2_ovw, NULL, NULL);
*
* Description:
* Refresh the Cache Managers screen with the given page number starting
- * at the given left-column number. The appropriate contents of
- * prev_cmData are displayed.
+ * at the given left-column number. The appropriate contents of
+ * prev_cmData are displayed.
* First the status labels at the four corners of the screen are
* updated. Next the column labels are updated and then each row
* of statistics.
- *
+ *
* Returns:
* Success: 0
* Failure: Exits afsmoitor on a severe error.
int code;
int cmIdx;
int labelIdx;
- int dataIndex; /* index to the data[] field of
+ int dataIndex; /* index to the data[] field of
* struct cm_Display_Data */
if (afsmon_debug) {
}
- /* if the data is not yet available, ie., not one probe cycle has
+ /* if the data is not yet available, ie., not one probe cycle has
* completed, do nothing */
if (!cm_Data_Available)
/* command line */
/* figure out what we need to show in the prompt & set the page type */
- /* the cm_pageType variable is in turn used by the keyboard handler
+ /* the cm_pageType variable is in turn used by the keyboard handler
* routines to call cm_refresh() with the correct parameters */
cm_pageType = resolve_CmdLine(cmdLine, 2 /* cm frame */ , a_pageNum,
* overflow flag is set and highlight if so. if the probe had failed
* enter "--" is all columns */
- /* each host has two rows of slots for datums. get the pointers to
+ /* each host has two rows of slots for datums. get the pointers to
* both the arrays */
firstSlot_o_Ptr = tmp_cm_lines_P->data_o[0];
* Switch_cm_2_fs()
*
* Description:
- * Switch from the Cache Manager screen to the File Servers screen
+ * Switch from the Cache Manager screen to the File Servers screen
*----------------------------------------------------------------------*/
int
Switch_cm_2_fs(void *d1, void *d2)
* Switch_cm_next()
*
* Description:
- * Switch to next page of cache managers screen
+ * Switch to next page of cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_next(void *d1, void *d2)
* Switch_cm_last()
*
* Description:
- * Switch to last page of file server screen
+ * Switch to last page of file server screen
*----------------------------------------------------------------------*/
int
Switch_cm_last(void *d1, void *d2)
* Switch_cm_prev()
*
* Description:
- * Switch to previous page of cache managers screen
+ * Switch to previous page of cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_prev(void *d1, void *d2)
* Switch_cm_first()
*
* Description:
- * Switch to first page of cache managers screen
+ * Switch to first page of cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_first(void *d1, void *d2)
* Switch_cm_left()
*
* Description:
- * Scroll left on the cache managers screen
+ * Scroll left on the cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_left(void *d1, void *d2)
* Switch_cm_leftmost()
*
* Description:
- * Scroll to first column on the cache managers screen
+ * Scroll to first column on the cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_leftmost(void *d1, void *d2)
* Switch_cm_right()
*
* Description:
- * Scroll right on the cache managers screen
+ * Scroll right on the cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_right(void *d1, void *d2)
* Switch_cm_rightmost()
*
* Description:
- * Scroll to last column on the cache managers screen
+ * Scroll to last column on the cache managers screen
*----------------------------------------------------------------------*/
int
Switch_cm_rightmost(void *d1, void *d2)
afsmon_Exit(445);
}
- /* for each line of server statistics allocate memory to store two arrays
+ /* for each line of server statistics allocate memory to store two arrays
* of data onodes */
cm_lines_Ptr = cm_lines;
keymap_BindToString(cmFrame->keymap, "Q", afsmonExit_gtx, NULL, NULL);
keymap_BindToString(cmFrame->keymap, "\ 3", afsmonExit_gtx, NULL, NULL);
- /* o = overview, c = cm, n = next, p = prev, l = left, r = right
+ /* o = overview, c = cm, n = next, p = prev, l = left, r = right
* N = last page, P = first page, L = leftmost col, R = rightmost col */
keymap_BindToString(cmFrame->keymap, "o", Switch_cm_2_ovw, NULL, NULL);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int afsmon_fs_curr_CBindex = 0; /* current fs CB slot */
-/* Probe number variables. The current probe number is incremented
+/* Probe number variables. The current probe number is incremented
when the first probe from a new probe cycle is received. The prev probe
number is incremented when the last probe of the current cycle is
received. This difference is because of the purpose for which these
int afsmon_cm_curr_CBindex = 0; /* current cm CB slot */
-/* Probe number variables. The current probe number is incremented
+/* Probe number variables. The current probe number is incremented
when the first probe from a new probe cycle is received. The prev probe
number is incremented when the last probe of the current cycle is
received. This difference is because of the purpose for which these
int num_cm_alerts;
int numHosts_oncm_alerts;
-/* flag to indicate that atleast one probe cycle has completed and
+/* flag to indicate that atleast one probe cycle has completed and
data is available for updating the display */
extern int fs_Data_Available;
extern int cm_Data_Available;
user wishes to display only the vcache statistics then the following array
will contain indices 2 to 14 corresponding to the position of the
vcache data items in the fs_varNames[] array. If the config file contains
-no "show fs .." directives, it will contain the indices of all the
+no "show fs .." directives, it will contain the indices of all the
items in the fs_varNames[] array */
short fs_Display_map[NUM_FS_STAT_ENTRIES];
extern int cm_currPage; /* current page number in the Cache Managers frame */
extern int cm_curr_LCol; /* current leftmost column on display on CM frame */
-/* File server and Cache manager data is classified into sections &
+/* File server and Cache manager data is classified into sections &
groups to help the user choose what he wants displayed */
extern char *fs_categories[]; /* file server data category names */
extern char *cm_categories[]; /* cache manager data category names */
#ifdef HAVE_STRCASESTR
extern char * strcasestr(const char *, const char *);
#else
-/*
- strcasestr(): Return first occurence of pattern s2 in s1, case
- insensitive.
+/*
+ strcasestr(): Return first occurence of pattern s2 in s1, case
+ insensitive.
This routine is required since I made pattern matching of the
- config file to be case insensitive.
+ config file to be case insensitive.
*/
char *
*
* Description
* Exit gracefully from the afsmonitor. Frees memory where appropriate,
- * cleans up after gtx and closes all open file descriptors. If a user
+ * cleans up after gtx and closes all open file descriptors. If a user
* provided threshold handler is to be exec'ed then gtx cleanup is
- * not performed and an exec() is made instead of an exit().
+ * not performed and an exec() is made instead of an exit().
*
* Returns
* Nothing.
*
- * Comments
- * This function is called to execute a user handler only
+ * Comments
+ * This function is called to execute a user handler only
* by a child process.
- *
+ *
*----------------------------------------------------------------------*/
int
*
* Description
* Parse the threshold entry line in the config file. This function is
- * called in the the first pass of the config file. It checks the syntax
+ * called in the the first pass of the config file. It checks the syntax
* of the config lines and verifies their positional validity - eg.,
* a cm threshold cannot appear after a fs hostname entry, etc.
* It also counts the thresholds applicable to each host.
* for cache managers. For global thresholds the info is recorded for
* all the hosts. This function is called in the second pass of the
* config file. In the first pass a count of the number of global
- * thresholds is determined and this information is used in this
+ * thresholds is determined and this information is used in this
* routine. If threshold entries are duplicated the first entry is
* overwritten.
* Each threshold entry also has an index field. This is a positional
* This data is mapped to the screen thru fs_Display_map[] and
* cm_Display_map[]. This routine parses the "show" entry against the
* section/group names in the [fs/cm]_categories[] array. If there is
- * no match it tries to match it against a variable name in
+ * no match it tries to match it against a variable name in
* [fs/cm]_varNames[] array. In each case the corresponding indices to
- * the data is the [fs/cm]_displayInfo[] is recorded.
+ * the data is the [fs/cm]_displayInfo[] is recorded.
*
* Returns:
* Success: 0
* process_config_file()
*
* Description:
- * Parse config file entries in two passes. In the first pass:
+ * Parse config file entries in two passes. In the first pass:
* - the syntax of all the entries is checked
- * - host names are noted and the FSnamesList and CMnamesList
- * constructed.
- * - a count of the global thresholds and local thresholds of
- * each host are counted.
+ * - host names are noted and the FSnamesList and CMnamesList
+ * constructed.
+ * - a count of the global thresholds and local thresholds of
+ * each host are counted.
* - "show" entries are processed.
* In the second pass:
- * - thresholds are stored
+ * - thresholds are stored
*
* Returns:
* Success: 0
}
/* the threshold count of all hosts in increased by 1 for each global
- * threshold. If one of the hosts has a local threshold for the same
+ * threshold. If one of the hosts has a local threshold for the same
* variable it would end up being counted twice. whats a few bytes of memory
* wasted anyway ? */
strncpy(last_cmHost, he->h_name, HOST_NAME_LEN);
} else if (strcasecmp(opcode, "thresh") == 0) {
/* if we have a threshold handler it may have arguments
- * and the sscanf() above would not get them, so do the
+ * and the sscanf() above would not get them, so do the
* following */
if (strlen(arg4)) {
handlerPtr = line;
* fs_Results_ltoa()
*
* Description:
- * The results of xstat probes are stored in a string format in
+ * The results of xstat probes are stored in a string format in
* the arrays curr_fsData and prev_fsData. The information stored in
- * prev_fsData is copied to the screen.
- * This function converts xstat FS results from longs to strings and
+ * prev_fsData is copied to the screen.
+ * This function converts xstat FS results from longs to strings and
* place them in the given buffer (a pointer to an item in curr_fsData).
* When a probe cycle completes, curr_fsData is copied to prev_fsData
* in afsmon_FS_Hnadler().
fullPerfP = (struct fs_stats_FullPerfStats *)
(a_fsResults->data.AFS_CollData_val);
- /* there are two parts to the xstat FS statistics
+ /* there are two parts to the xstat FS statistics
* - fullPerfP->overall which give the overall performance statistics, and
* - fullPerfP->det which gives detailed info about file server operation
* execution times */
* execute_thresh_handler()
*
* Description:
- * Execute a threshold handler. An agrv[] array of pointers is
- * constructed from the given data. A child process is forked
+ * Execute a threshold handler. An agrv[] array of pointers is
+ * constructed from the given data. A child process is forked
* which immediately calls afsmon_Exit() with indication that a
- * threshold handler is to be exec'ed insted of exiting.
+ * threshold handler is to be exec'ed insted of exiting.
*
* Returns:
* Success: 0
* Description:
* Checks the thresholds and sets the overflow flag. Recall that the
* thresholds for each host are stored in the hostEntry lists
- * [fs/cm]nameList arrays. The probe results are passed to this
+ * [fs/cm]nameList arrays. The probe results are passed to this
* function in the display-ready format - ie., as strings. Though
* this looks stupid the overhead incurred in converting the strings
- * back to floats and comparing them is insignificant and
- * programming is easier this way.
+ * back to floats and comparing them is insignificant and
+ * programming is easier this way.
* The threshold flags are a part of the display structures
* curr_[fs/cm]Data.
*
* Description:
* Does the following:
* - if the probe number changed (ie, a cycle completed) curr_fsData
- * is copied to prev_fsData, curr_fsData zeroed and refresh the
+ * is copied to prev_fsData, curr_fsData zeroed and refresh the
* overview screen and file server screen with the new data.
* - store the results of the current probe from xstat_fs_Results into
* curr_fsData. ie., convert longs to strings.
- * - check the thresholds
+ * - check the thresholds
*
* Returns:
* Success: 0
}
/* Check the status of the probe. If it succeeded, we store its
- * results in the display data structure. If it failed we only mark
+ * results in the display data structure. If it failed we only mark
* the failed status in the display data structure. */
if (a_fsResults->probeOK) { /* 1 => notOK the xstat results */
fs_Results_ltoa(curr_fsDataP, a_fsResults);
/* compare with thresholds and set the overflow flags.
- * note that the threshold information is in the hostEntry structure and
+ * note that the threshold information is in the hostEntry structure and
* each threshold item has a positional index associated with it */
/* locate the hostEntry for this host */
}
}
- /* Update current probe number and circular buffer index. if current
+ /* Update current probe number and circular buffer index. if current
* probenum changed make sure it is only by 1 */
newProbeCycle = 0;
/* store the results of the current probe in the fs data display structure.
* if the current probe number changed, swap the current and previous display
- * structures. note that the display screen is updated from these structures
+ * structures. note that the display screen is updated from these structures
* and should start showing the data of the just completed probe cycle */
save_FS_data_forDisplay(&xstat_fs_Results);
-/*----------------------------------------------------------------------- *
- * Print_CM_CB()
+/*----------------------------------------------------------------------- *
+ * Print_CM_CB()
*
* Description:
* Debug routine.
- * Prints the Cache Manager circular buffer
+ * Prints the Cache Manager circular buffer
*----------------------------------------------------------------------*/
void
* cm_Results_ltoa()
*
* Description:
- * The results of xstat probes are stored in a string format in
+ * The results of xstat probes are stored in a string format in
* the arrays curr_cmData and prev_cmData. The information stored in
- * prev_cmData is copied to the screen.
- * This function converts xstat FS results from longs to strings and
+ * prev_cmData is copied to the screen.
+ * This function converts xstat FS results from longs to strings and
* places them in the given buffer (a pointer to an item in curr_cmData).
* When a probe cycle completes, curr_cmData is copied to prev_cmData
* in afsmon_CM_Handler().
/* There are 4 parts to CM statistics
* - Overall performance statistics (including up/down statistics)
- * - This CMs FS RPC operations info
+ * - This CMs FS RPC operations info
* - This CMs FS RPC errors info
* - This CMs FS transfers info
* - Authentication info
* Description:
* Checks the thresholds and sets the overflow flag. Recall that the
* thresholds for each host are stored in the hostEntry lists
- * [fs/cm]nameList arrays. The probe results are passed to this
+ * [fs/cm]nameList arrays. The probe results are passed to this
* function in the display-ready format - ie., as strings. Though
* this looks stupid the overhead incurred in converting the strings
- * back to floats and comparing them is insignificant and
- * programming is easier this way.
+ * back to floats and comparing them is insignificant and
+ * programming is easier this way.
* The threshold flags are a part of the display structures
* curr_[fs/cm]Data.
*
* Description:
* Does the following:
* - if the probe number changed (ie, a cycle completed) curr_cmData
- * is copied to prev_cmData, curr_cmData zeroed and refresh the
+ * is copied to prev_cmData, curr_cmData zeroed and refresh the
* overview screen and file server screen with the new data.
* - store the results of the current probe from xstat_cm_Results into
* curr_cmData. ie., convert longs to strings.
- * - check the thresholds
+ * - check the thresholds
*
* Returns:
* Success: 0
}
/* Check the status of the probe. If it succeeded, we store its
- * results in the display data structure. If it failed we only mark
+ * results in the display data structure. If it failed we only mark
* the failed status in the display data structure. */
cm_Results_ltoa(curr_cmDataP, a_cmResults);
/* compare with thresholds and set the overflow flags.
- * note that the threshold information is in the hostEntry structure and
+ * note that the threshold information is in the hostEntry structure and
* each threshold item has a positional index associated with it */
/* locate the hostEntry for this host */
}
}
- /* Update current probe number and circular buffer index. if current
+ /* Update current probe number and circular buffer index. if current
* probenum changed make sure it is only by 1 */
newProbeCycle = 0;
/* store the results of the current probe in the cm data display structure.
* if the current probe number changed, swap the current and previous display
- * structures. note that the display screen is updated from these structures
+ * structures. note that the display screen is updated from these structures
* and should start showing the data of the just completed probe cycle */
save_CM_data_forDisplay(&xstat_cm_Results);
afsmon_fs_ResultsCB[i].probeNum = 0;
}
- /* create a list of numFS items to store fs probe results for
+ /* create a list of numFS items to store fs probe results for
* each slot in CB */
if (numFS) { /* if we have file servers to monitor */
while (numfs--) {
/* if any of these mallocs fail we only need to free the memory we
- * have allocated in this iteration. the rest of it which is in a
+ * have allocated in this iteration. the rest of it which is in a
* proper linked list will be freed in afsmon_Exit */
/* allocate memory for an fs list item */
afsmon_cm_ResultsCB[i].probeNum = 0;
}
- /* create a list of numCM items to store fs probe results for
+ /* create a list of numCM items to store fs probe results for
* each slot in CB */
if (numCM) { /* if we have file servers to monitor */
while (numcm--) {
/* if any of these mallocs fail we only need to free the memory we
- * have allocated in this iteration. the rest of it which is in a
+ * have allocated in this iteration. the rest of it which is in a
* proper linked list will be freed in afsmon_Exit */
/* allocate memory for an fs list item */
*
* Description:
* Allocate and initialize the buffers used for printing results
- * to the display screen. These buffers store the current and
- * previous probe results in ascii format.
+ * to the display screen. These buffers store the current and
+ * previous probe results in ascii format.
*
* Returns:
* Success: 0
/* we need two instances of this structure - one (curr_fsData) for storing
* the results of the fs probes currently in progress and another (prev_fsData)
* for the last completed probe. The display is updated from the contents of
- * prev_fsData. The pointers curr_fsData & prev_fsData are switched whenever
+ * prev_fsData. The pointers curr_fsData & prev_fsData are switched whenever
* the probe number changes */
if (numFS) {
* Description:
* This is where we start it all. Initialize an array of sockets for
* file servers and cache cache managers and call the xstat_[fs/cm]_Init
- * routines. The last step is to call the gtx input server which
+ * routines. The last step is to call the gtx input server which
* grabs control of the keyboard.
*
* Returns:
/* end of process cache manager entries */
- /* if only one probe was required setup a waiting process for the
+ /* if only one probe was required setup a waiting process for the
* termination signal */
if (afsmon_onceOnly) {
code = LWP_WaitProcess(&terminationEvent);
FSnameList = (struct afsmon_hostEntry *)0;
CMnameList = (struct afsmon_hostEntry *)0;
- /* The -config option is mutually exclusive with the -fshosts,-cmhosts
+ /* The -config option is mutually exclusive with the -fshosts,-cmhosts
* options */
if (as->parms[P_CONFIG].items) {
/* If a file server host is specified on the command line we reuse
- * parse_hostEntry() function . Just the pass the info as if it were
+ * parse_hostEntry() function . Just the pass the info as if it were
* read off the config file */
if (as->parms[P_FSHOSTS].items) {
"number of buffer slots");
/*
- * Parse command-line switches & execute afsmonitor
+ * Parse command-line switches & execute afsmonitor
*/
code = cmd_Dispatch(argc, argv);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define FS_CB_ENTRY_START (FS_FULLPERF_ENTRY_END + 1)
#define FS_CB_ENTRY_END (FS_CB_ENTRY_START + NUM_FS_CB_ENTRIES - 1)
-/* structures to store statistics in a format convenient to dump to the
+/* structures to store statistics in a format convenient to dump to the
screen */
/* for file servers */
struct fs_Display_Data {
#define DETAILED_DEBUG 0
/* afsmon-output.c */
-
+
extern int afsmon_fsOutput(char *, int);
extern int afsmon_cmOutput(char *, int);
/* afsmon-win.c */
-
+
extern int ovw_refresh(int, int);
extern int fs_refresh(int, int);
extern int cm_refresh(int, int);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Look up a login ID in the cache. If an entry name is found for the
- * given username, and the SHA checksums match, then
+ * given username, and the SHA checksums match, then
* set the token parameter and return 1, otherwise return 0.
*/
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
- * Implements most of the client side web authentication protocol
+ * Implements most of the client side web authentication protocol
*/
-/*
+/*
*/
#include "apache_afs_utils.h"
#ifndef NO_AFSAPACHE_CACHE
/*
- * check local cache for the token associated with user crds.
+ * check local cache for the token associated with user crds.
*/
static int
check_Cache(char *user, char *passwd, char *cell, char *tokenBuf)
#endif /* NO_APACHEAFS_CACHE */
-/*
- * locking routines to provide exclusive access to the pipes
+/*
+ * locking routines to provide exclusive access to the pipes
*/
static int
start_lock(int fd, int cmd, int type)
#define Is_writelock(fd) \
test_lock(fd, F_WRLCK)
-/*
+/*
* communication between this process and weblog - sends user credentials
* over a shared pipe (mutex provided using locks) and recieves either a
- * token or an error message
+ * token or an error message
*/
static int
request_Authentication(char *user, char *passwd, char *cell, char *type,
afsassert(type);
afsassert(tokenbuf);
-/*
+/*
* lock the pipe before beginning communication or in case of AIX it is an
* error to attempt to lock a pipe or FIFO (EINVAL) therefore we have to create
* a temporary file and use that fd instead
afsassert(tokenBuf);
- /*
- * set the primary flag only if we haven't done a SETPAG previoulsy
- * by flipping this bit
+ /*
+ * set the primary flag only if we haven't done a SETPAG previoulsy
+ * by flipping this bit
*/
if (!doneSETPAG) {
#ifdef OLDSETPAG
}
-/*
- * discard all authentication information for this PAG ie. this process
+/*
+ * discard all authentication information for this PAG ie. this process
*/
int
unlog()
}
-/*
+/*
* Does the following things:
* Checks whether there is a Basic Authentication header - obtains creds.
* Checks local cache for the token associated with the user creds.
* - if no token in cache - obtains token from weblog using pipes
- * - sets the token and returns appropriate return code
+ * - sets the token and returns appropriate return code
* Return values: OK, SERVER_ERROR, AUTH_REQUIRED, FORBIDDEN
*/
int
memset(cell, 0, APACHEAFS_CELLNAME_MAX);
if (auth_line == NULL) { /* No Authorization field - we don't do anything */
- /*
+ /*
* No Authorization field recieved - that's fine by us.
- * go ahead and attempt to service the request and if we get
+ * go ahead and attempt to service the request and if we get
* back FORBIDDEN then we'll take care of it then
*/
afslog(15, ("%s: No authline recieved", module_name));
return OK;
}
- /*
- * We should get here only if there IS an Authorization field
+ /*
+ * We should get here only if there IS an Authorization field
*/
if ((rc = parse_authhdr(r, user, passwd, cell, defaultCell)) != 0) {
return rc; /* SERVER ERROR */
}
- /*
+ /*
* should get here only after obtaining the username and password and cell
* check to make sure anyway
*/
fprintf(stderr, "Cell:%s\tUser:%s\tPasswd:%s\n", cell, user, passwd);
#endif
- /*
- * compare with previous username/cell/cksum - update it
- * unlog if required
+ /*
+ * compare with previous username/cell/cksum - update it
+ * unlog if required
*/
weblog_login_checksum(user, cell, passwd, cksum);
}
if (strcmp(user, lastUser) || strcmp(cell, lastCell)
|| strcmp(cksum, lastCksum)) {
- /*
- * unlog the old user from the cell if a new username/passwd is recievd
+ /*
+ * unlog the old user from the cell if a new username/passwd is recievd
*/
userChanged = 1;
rc = check_Cache(user, passwd, cell, tokenbuf);
if (rc) {
- /* if found then just send the request without going through
+ /* if found then just send the request without going through
* weblog - this means the user has already been authenticated
- * once and we have a valid token just need to set it -
- * only if it is different from the token already set. No need to
- * even unlog because this token is set for the entire PAG which
+ * once and we have a valid token just need to set it -
+ * only if it is different from the token already set. No need to
+ * even unlog because this token is set for the entire PAG which
* of course consists of just this child process
*/
afslog(35,
module_name, getpid(), user,
(getExpiration(tokenbuf) - time(NULL))));
- /* if the user changed then set this token else leave it since it should
+ /* if the user changed then set this token else leave it since it should
* be set */
if (userChanged) {
/* set this token obtained from the local cache */
#ifdef DEBUG_CACHE
parseToken(tokenbuf);
#endif
- /*
- * BUG WORKAROUND: sometimes we fail while setting token
- * with errno ESRCH indicating the named cell
- * in the last field of the token is not recognized - but that's
+ /*
+ * BUG WORKAROUND: sometimes we fail while setting token
+ * with errno ESRCH indicating the named cell
+ * in the last field of the token is not recognized - but that's
* not quite true according to parseToken()!! Possibly corrupted
* tokens from the cache?
- * Anyway we just get a new token from weblog
+ * Anyway we just get a new token from weblog
*/
goto reqAuth;
}
} /* if userChanged */
else {
/* if this is a child process getting the request for the first time
- * then there's no way this guy's got a token for us in which case
+ * then there's no way this guy's got a token for us in which case
* getToken should fail with EDOM and that means we should set the token
* first and maybe set a static variable saying we have set a token?
*/
if (errno == EDOM) {
/* try setting the cached token */
if (setToken(tokenbuf, rc)) {
- /*
+ /*
* same bug workaround here. ie. go to weblog if setting
* the cached token fails.
*/
strcpy(r->connection->user, user);
return OK;
}
- /*
- * else - request afs_Authenticator's for it and update local cache
- * then go about serving the request URI
+ /*
+ * else - request afs_Authenticator's for it and update local cache
+ * then go about serving the request URI
*/
else {
reqAuth:
#endif /* NO_AFSAPACHE_CACHE */
/* now we've got a token, updated the cache and set it so we should
- * have no problems accessing AFS files - however if we do then
+ * have no problems accessing AFS files - however if we do then
* we handle it in afs_accessCheck() when the error comes back
*/
}
else {
- /*
+ /*
* unknown error from weblog - this should not occur
- * if afs_Authenticator can't authenticate you, then return FORBIDDEN
+ * if afs_Authenticator can't authenticate you, then return FORBIDDEN
*/
sprintf(err_msg,
"%s: AFS could not authenticate user %s in cell %s."
/*
- * Checks if we have some authentication credentials, if we do returns
- * FORBIDDEN and if we don't then returns AUTH_REQUIRED with the appropriate
+ * Checks if we have some authentication credentials, if we do returns
+ * FORBIDDEN and if we don't then returns AUTH_REQUIRED with the appropriate
* www-authenticate header. Should be called if we can't access a file because
* permission is denied.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* afs_module Version 1.3 < for Apache Server version 1.2.6 and 1.3.1 >
- *
+ *
* Add to Configuration file (before any of the Authentication modules)
* Module afs_module afs_module.o
- *
+ *
* Add to server configuration file:
* SetAFSDefaultCell <cell name>
* SetAFSCacheExpiration <seconds for AFS client cache expiration>
#include "http_conf_globals.h"
-/*
+/*
* default parameters - if none are specified in the config file
* these are used
*/
return 0;
}
-/*
- * per-server configuration creator
+/*
+ * per-server configuration creator
*/
void *
create_afs_server_config(pool * p, server_rec * s)
}
/*
- * per-dir configuration record creator
+ * per-dir configuration record creator
*/
void *
create_afs_dir_config(pool * p, char *dummy)
/*
* Handlers for server config lines - set afs default cell, weblog path, access log,
- * token and cache expiration time to the server configuration. As well as per-dir
+ * token and cache expiration time to the server configuration. As well as per-dir
* configs like AFSAuthentication.
*/
const char *
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Apache plugin for AFS authentication - should be archived to libapacheafs.a
* contains calls to functions in apache_afs_client.o - and is the intermediary
- * between the module that plugs into apache's source code and the
+ * between the module that plugs into apache's source code and the
* apache_afs_client. Shares global variables with the module and the client.
*/
close(pipe2[1]);
fclose(fp);
- /* exit by sending a SIGTERM to the httpd process (how to get the pid?)
- * since at this point the pid file is outdated and only if we sleep for
- * a while to allow httpd_main to put it's pid in the pidfile can we
+ /* exit by sending a SIGTERM to the httpd process (how to get the pid?)
+ * since at this point the pid file is outdated and only if we sleep for
+ * a while to allow httpd_main to put it's pid in the pidfile can we
* attempt to send it a SIGTERM for graceful shuttdown)
- * so that everything is brought down - if you want to bring everything
+ * so that everything is brought down - if you want to bring everything
* down!! Else continue with httpd without AFS authentication.
*/
/*#ifdef SHUTDOWN_IF_AFS_FAILS in afs_module.c */
}
/*
- * recursively stats the path to see where we're going wrong and
- * chops off the path_info part of it -
+ * recursively stats the path to see where we're going wrong and
+ * chops off the path_info part of it -
* Returns OK or an HTTP status code
- * Called if we get a ENOTDIR from the first stab at statting the
+ * Called if we get a ENOTDIR from the first stab at statting the
* entire path - so we assume that we have some PATH_INFO and try to
* chop it off the end and return the path itself
* Side effects on request_rec
while (cp > path && cp[-1] == '/')
--cp;
} else if (errno != EACCES) {
- /*
+ /*
* this would be really bad since we checked the entire path
* earlier and got ENOTDIR instead of EACCES - so why are we getting
* it now? Anyway, we ought to return FORBIDDEN
("%s: pid:%d\tpath:%s\tstat error:%s", module_name, getpid(),
path, strerror(errno)));
- /*
+ /*
* if the requested method is an HTTP PUT and the file does not
* exist then well, we'll get a stat error but we shouldn't return
* an error - we should try and open the file in append mode and then
}
}
} else if (errno == ENOTDIR) {
- /*
- * maybe the special case of CGI PATH_INFO to be translated to
+ /*
+ * maybe the special case of CGI PATH_INFO to be translated to
* PATH_TRANSLATED - check each component of this path
- * and stat it to see what portion of the url is actually
+ * and stat it to see what portion of the url is actually
* the path and discard the rest for our purposes.
*/
rc = remove_path_info(r, path, &buf);
return sort_stat_error(r);
}
}
- /*
+ /*
* If we get here then we have something - either a file or a directory
*/
else {
*/
type = (char *)get_afsauthtype(r);
- /*
+ /*
* UserDir (tilde) support
*/
#ifndef APACHE_1_3
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "apache_afs_utils.h"
#include "apache_afs_utils.h"
-/*
+/*
* do_pioctl does the actual call to pioctl (or equivalent for that platform)
* sets up the ViceIoctl buffer with all the parameters required
* NOTE: in_buffer and out_buffer may point to the same memory buffer
}
-/*
- * flipPrimary sets the primary cell longword -
- * enabling a SETPAG if the same buffer is used with VICESETTOK
+/*
+ * flipPrimary sets the primary cell longword -
+ * enabling a SETPAG if the same buffer is used with VICESETTOK
*/
flipPrimary(char *tokenBuf)
{
fprintf(stderr, "\n");
}
-/*
- * debugging utility to see if the group id changes - if SETPAG worked
- * call this before and after the routine to dosetpag and verify results
+/*
+ * debugging utility to see if the group id changes - if SETPAG worked
+ * call this before and after the routine to dosetpag and verify results
*/
int
return 0;
}
-/*
- * prints clear token fields, cell name and primary flag to stdout
+/*
+ * prints clear token fields, cell name and primary flag to stdout
*/
void
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-/* the wrapper nanny process around weblog that would restart it in case it
- * failed and hopefully log the error somewhere! The need for this nanny
- * process arises because the pipe descriptors need to be maintained. The
- * process catches SIGTERM and kills the weblog process and exits.
+/* the wrapper nanny process around weblog that would restart it in case it
+ * failed and hopefully log the error somewhere! The need for this nanny
+ * process arises because the pipe descriptors need to be maintained. The
+ * process catches SIGTERM and kills the weblog process and exits.
* The following line needs to precede the kill -TERM line for httpd.pid
* in the stopd script to stop the server
kill -TERM `<cat /local/stronghold/apache/logs/httpd.pid>.afs`
- * or whatever the pid file
+ * or whatever the pid file
*/
#include <afs/stds.h>
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
- * Apache API calls required by libapacheafs.a
+ * Apache API calls required by libapacheafs.a
*/
#ifndef _APACHE_API_H_INCLUDED_
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
*/
/* Arenas for configuration info and transaction info
- * --- actual layout of the pool structure is private to
- * alloc.c.
+ * --- actual layout of the pool structure is private to
+ * alloc.c.
*/
typedef struct pool pool;
* to keep CGI scripts and the like from inheriting access to things
* they shouldn't be able to touch, and one for actually cleaning up,
* when the actual server process wants to get rid of the thing,
- * whatever it is.
+ * whatever it is.
*
* kill_cleanup disarms a cleanup, presumably because the resource in
* question has been closed, freed, or whatever, and it's scarce
extern void unblock_alarms();
/* Common cases which want utility support..
- * the note_cleanups_for_foo routines are for
+ * the note_cleanups_for_foo routines are for
*/
FILE *pfopen(struct pool *, const char *name, const char *fmode);
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
/*
* The particular directory style your system supports. If you have dirent.h
- * in /usr/include (POSIX) or /usr/include/sys (SYSV), #include
- * that file and define DIR_TYPE to be dirent. Otherwise, if you have
+ * in /usr/include (POSIX) or /usr/include/sys (SYSV), #include
+ * that file and define DIR_TYPE to be dirent. Otherwise, if you have
* /usr/include/sys/dir.h, define DIR_TYPE to be direct and include that
* file. If you have neither, I'm confused.
*/
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
*
*/
-/*
+/*
* Process config --- what the process ITSELF is doing
*/
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
/* Default administrator's address */
#define DEFAULT_ADMIN "[no address given]"
-/*
+/*
* --------- You shouldn't have to edit anything below this line ----------
*
- * Any modifications to any defaults not defined above should be done in the
- * respective config. file.
+ * Any modifications to any defaults not defined above should be done in the
+ * respective config. file.
*
*/
/* If you have altered Apache and wish to change the SERVER_VERSION
* identifier below, please keep to the HTTP specification. This states that
* the identification string should consist of product tokens with an optional
- * slash and version designator. Sub-products which form a significant part
+ * slash and version designator. Sub-products which form a significant part
* of the application can be listed, separated by whitespace, by adding
* their product tokens to EXTRA_CFLAGS in the Configuration file like so.
*
* The tokens are listed in order of their significance for identifying the
* application.
*
- * "Product tokens should be short and to the point -- use of them for
+ * "Product tokens should be short and to the point -- use of them for
* advertizing or other non-essential information is explicitly forbidden."
*
- * Example: "Apache/1.1.0 MrWidget/0.1-alpha"
+ * Example: "Apache/1.1.0 MrWidget/0.1-alpha"
*/
#define SERVER_BASEVERSION "Apache/1.2.6" /* SEE COMMENTS ABOVE */
* pointer to where we redirected *from*.
*/
- request_rec *main; /* If this is a sub_request (see request.h)
+ request_rec *main; /* If this is a sub_request (see request.h)
* pointer back to the main request.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
- * Interface for pioctls - used for unlogging
+ * Interface for pioctls - used for unlogging
*/
#include "afs/venus.h"
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Implements the weblog binary which links with the AFS libraries and acts
* as the server for authenticating users for apache access to AFS. Code
- * structure is based on klog.c. The communication with clients is done
+ * structure is based on klog.c. The communication with clients is done
* via pipes whose file descriptors are passed as command line arguments
- * thus making it necessary for a common parent to start this process and
- * the processes that will communicate with it for them to inherit the
+ * thus making it necessary for a common parent to start this process and
+ * the processes that will communicate with it for them to inherit the
* pipes. Also passed as a command line argument is a Silent flag (like klog)
* and a cache expiration flag which allows cache expiration times for
* tokens to be set for testing purposes
static int readPipe;
static int writePipe;
-/*
- * now I know why this was necessary! - it's a hokie thing -
+/*
+ * now I know why this was necessary! - it's a hokie thing -
* the call to ka_UserAuthenticateGeneral doesn't compile otherwise
*/
int
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
sigaction(SIGSEGV, &nsa, NULL);
#endif
-/*
+/*
* we ignore SIGPIPE so that EPIPE is returned if there is no one reading
- * data being written to the pipe
+ * data being written to the pipe
*/
#ifdef AIX
/*
- * send a buffer over the pipe
+ * send a buffer over the pipe
*/
static int
sendToken(int len, void *buf)
return n;
}
-/*
+/*
* copies the string spereated by the sep into retbuf and returns the position
- * from the beginning of the string that this string ends at so you can call
- * it againword seperated by the sep character and give that value as th start
+ * from the beginning of the string that this string ends at so you can call
+ * it againword seperated by the sep character and give that value as th start
* parameter - used to parse incoming buffer from clients over the pipe
*/
-/*
+/*
* NOTE - the space seperated credentials failed for passwds with spaces, thus
* we use newline for seperators instead
*/
}
-/*
+/*
* parses the NEWLINE seperated buffer giving the username, passwd and cell
* coming over the pipe from the clients and sets the variables accordingly
*/
*/
token_cache_init();
- /*
- * discard any tokens held for this PAG -
+ /*
+ * discard any tokens held for this PAG -
* should we create a seperate PAG for weblog first? makeNewPAG does that
*/
#ifdef DEBUG
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* $Id$
*
* Copyright 1990,1991 by the Massachusetts Institute of Technology
* For distribution and copying rights, see the file "mit-copyright.h"
*/
/*
- * Copyright (c) 2005, 2006
- * The Linux Box Corporation
- * ALL RIGHTS RESERVED
- *
- * Permission is granted to use, copy, create derivative works
- * and redistribute this software and such derivative works
- * for any purpose, so long as the name of the Linux Box
- * Corporation is not used in any advertising or publicity
- * pertaining to the use or distribution of this software
- * without specific, written prior authorization. If the
- * above copyright notice or any other identification of the
- * Linux Box Corporation is included in any copy of any
- * portion of this software, then the disclaimer below must
- * also be included.
- *
- * This software is provided as is, without representation
- * from the Linux Box Corporation as to its fitness for any
- * purpose, and without warranty by the Linux Box Corporation
- * of any kind, either express or implied, including
- * without limitation the implied warranties of
- * merchantability and fitness for a particular purpose. The
- * regents of the Linux Box Corporation shall not be liable
- * for any damages, including special, indirect, incidental, or
- * consequential damages, with respect to any claim arising
- * out of or in connection with the use of the software, even
- * if it has been or is hereafter advised of the possibility of
- * such damages.
+ * Copyright (c) 2005, 2006
+ * The Linux Box Corporation
+ * ALL RIGHTS RESERVED
+ *
+ * Permission is granted to use, copy, create derivative works
+ * and redistribute this software and such derivative works
+ * for any purpose, so long as the name of the Linux Box
+ * Corporation is not used in any advertising or publicity
+ * pertaining to the use or distribution of this software
+ * without specific, written prior authorization. If the
+ * above copyright notice or any other identification of the
+ * Linux Box Corporation is included in any copy of any
+ * portion of this software, then the disclaimer below must
+ * also be included.
+ *
+ * This software is provided as is, without representation
+ * from the Linux Box Corporation as to its fitness for any
+ * purpose, and without warranty by the Linux Box Corporation
+ * of any kind, either express or implied, including
+ * without limitation the implied warranties of
+ * merchantability and fitness for a particular purpose. The
+ * regents of the Linux Box Corporation shall not be liable
+ * for any damages, including special, indirect, incidental, or
+ * consequential damages, with respect to any claim arising
+ * out of or in connection with the use of the software, even
+ * if it has been or is hereafter advised of the possibility of
+ * such damages.
*/
#include <afsconfig.h>
#error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
#endif
-#if !defined(HAVE_KRB5_ENCRYPT_TKT_PART) && defined(HAVE_ENCODE_KRB5_ENC_TKT_PART) && defined(HAVE_KRB5_C_ENCRYPT)
+#if !defined(HAVE_KRB5_ENCRYPT_TKT_PART) && defined(HAVE_ENCODE_KRB5_ENC_TKT_PART) && defined(HAVE_KRB5_C_ENCRYPT)
extern krb5_error_code encode_krb5_enc_tkt_part (const krb5_enc_tkt_part *rep,
krb5_data **code);
krb5_data *data = 0;
int code;
size_t enclen;
-
+
if ((code = encode_krb5_enc_tkt_part(ticket->enc_part2, &data)))
goto Done;
if ((code = krb5_c_encrypt_length(context, key->enctype,
if ((new_cellinfo = (cellinfo_t *)malloc(sizeof(cellinfo_t))))
memcpy(new_cellinfo, cellinfo, sizeof(cellinfo_t));
-
+
return ((char *)new_cellinfo);
}
}
if (!(configdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: can't get afs configuration (afsconf_Open(%s))\n",
progname, AFSDIR_CLIENT_ETC_DIRPATH);
exit(AKLOG_AFS);
!memcmp(tokenA->ticket, tokenB->ticket, tokenA->ticketLen));
}
-/*
+/*
* Log to a cell. If the cell has already been logged to, return without
* doing anything. Otherwise, log to it and mark that it has been logged
* to.
goto out;
}
- /*
+ /*
* Record that we have attempted to log to this cell. We do this
* before we try rather than after so that we will not try
* and fail repeatedly for one cell.
*/
ll_string(&authedcells, ll_s_add, cellconf.name);
- /*
+ /*
* Record this cell in the list of zephyr subscriptions. We may
* want zephyr subscriptions even if authentication fails.
* If this is done after we attempt to get tokens, aklog -zsubs
* are in -noauth mode.
*/
if (ll_string(&zsublist, ll_s_add, cellconf.name) == LL_FAILURE) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: failure adding cell %s to zephyr subscriptions list.\n",
progname, cellconf.name);
exit(AKLOG_MISC);
}
if (ll_string(&zsublist, ll_s_add, local_cell) == LL_FAILURE) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: failure adding cell %s to zephyr subscriptions list.\n",
progname, local_cell);
exit(AKLOG_MISC);
afs_dprintf("Error %d\n", status);
else
afs_dprintf("Id %d\n", (int) viceId);
-
+
/*
* This code is taken from cklog -- it lets people
#ifndef AFS_AIX51_ENV
/* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before
- * this routine, it will not add the token. It is not clear what
+ * this routine, it will not add the token. It is not clear what
* is going on here! So we will do the following operation.
* On AIX 5, it causes the parent program to die, so we won't.
*/
else {
last_component = our_file;
parent_dir = ".";
- }
-
+ }
+
memset(cellname, 0, sizeof(cellname));
vio.in = last_component;
vio.in_size = strlen(file) + 1;
vio.out_size = sizeof(cellname);
vio.out = cellname;
-
+
if (!pioctl(file, VIOC_FILE_CELL_NAME, &vio, 1)) {
strcat(cellname, VOLMARKERSTRING);
strcat(cellname, mountpoint + 1);
return(FALSE);
}
-/*
- * This routine each time it is called returns the next directory
+/*
+ * This routine each time it is called returns the next directory
* down a pathname. It resolves all symbolic links. The first time
* it is called, it should be called with the name of the path
* to be descended. After that, it should be called with the arguemnt
static char *elast_comp; /* End of last component */
char *t;
int len;
-
+
static int symlinkcount = 0; /* We can't exceed MAXSYMLINKS */
-
+
/* If we are given something for origpath, we are initializing only. */
if (origpath) {
memset(path, 0, sizeof(path));
}
/* We were not given origpath; find then next path to check */
-
+
/* If we've gotten all the way through already, return NULL */
if (last_comp == NULL)
return(NULL);
do {
while (*last_comp == DIR)
strncat(pathtocheck, last_comp++, 1);
- len = (elast_comp = strchr(last_comp, DIR))
+ len = (elast_comp = strchr(last_comp, DIR))
? elast_comp - last_comp : strlen(last_comp);
strncat(pathtocheck, last_comp, len);
memset(linkbuf, 0, sizeof(linkbuf));
- if ((link = (readlink(pathtocheck, linkbuf,
+ if ((link = (readlink(pathtocheck, linkbuf,
sizeof(linkbuf)) > 0))) {
if (++symlinkcount > MAXSYMLINKS) {
fprintf(stderr, "%s: %s\n", progname, strerror(ELOOP));
if (elast_comp)
strcpy(tmpbuf, elast_comp);
if (linkbuf[0] == DIR) {
- /*
- * If this is a symbolic link to an absolute path,
+ /*
+ * If this is a symbolic link to an absolute path,
* replace what we have by the absolute path.
*/
memset(path, 0, strlen(path));
memset(pathtocheck, 0, sizeof(pathtocheck));
}
else {
- /*
- * If this is a symbolic link to a relative path,
+ /*
+ * If this is a symbolic link to a relative path,
* replace only the last component with the link name.
*/
strncpy(last_comp, linkbuf, strlen(linkbuf) + 1);
int i;
struct hostent *hp;
struct in_addr in;
-
+
memset(outbuf, 0, sizeof(outbuf));
vio.out_size = sizeof(outbuf);
* If it is replicated on many servers, then none are included.
* This is not perfect, but the result is that people don't
* get subscribed to a lot of instances of FILSRV that they
- * probably won't need which reduces the instances of
+ * probably won't need which reduces the instances of
* people getting messages that don't apply to them.
*/
#ifndef ALLHOSTS
}
/*
- * This routine descends through a path to a directory, logging to
+ * This routine descends through a path to a directory, logging to
* every cell it encounters along the way.
*/
static int
while ((nextpath = next_path(NULL))) {
strcpy(pathtocheck, nextpath);
afs_dprintf("Checking directory %s\n", pathtocheck);
- /*
- * If this is an afs mountpoint, determine what cell from
- * the mountpoint name which is of the form
+ /*
+ * If this is an afs mountpoint, determine what cell from
+ * the mountpoint name which is of the form
* #cellname:volumename or %cellname:volumename.
*/
if (get_afs_mountpoint(pathtocheck, mountpoint, sizeof(mountpoint))) {
if (isdir(pathtocheck, &isdirectory) < 0) {
/*
* If we've logged and still can't stat, there's
- * a problem...
+ * a problem...
*/
- fprintf(stderr, "%s: stat(%s): %s\n", progname,
+ fprintf(stderr, "%s: stat(%s): %s\n", progname,
pathtocheck, strerror(errno));
return(AKLOG_BADPATH);
}
}
}
}
-
+
return(status);
}
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-d") == 0)
dflag++;
- else if (strcmp(argv[i], "-noauth") == 0)
+ else if (strcmp(argv[i], "-noauth") == 0)
noauth++;
else if (strcmp(argv[i], "-zsubs") == 0)
zsubs++;
}
else
usage();
-
+
else if (argv[i][0] == '-')
usage();
else if (!pmode && !cmode) {
pmode++;
strcpy(path, argv[i]);
}
- else {
+ else {
cmode++;
strcpy(cell, argv[i]);
}
if ((new_cellinfo = copy_cellinfo(&cellinfo)))
ll_add_data(cur_node, new_cellinfo);
else {
- fprintf(stderr,
+ fprintf(stderr,
"%s: failure copying cellinfo.\n", progname);
exit(AKLOG_MISC);
}
struct passwd *pwd;
status = auth_to_cell(context, NULL, NULL, &linkedcell);
-
+
/* If this cell is linked to a DCE cell, and user requested -linked,
* get tokens for both. This is very useful when the AFS cell is
* linked to a DFS cell and this system does not also have DFS.
if ((status = auth_to_path(context, cur_node->data)))
somethingswrong++;
}
-
- /*
- * If only one thing was logged to, we'll return the status
+
+ /*
+ * If only one thing was logged to, we'll return the status
* of the single call. Otherwise, we'll return a generic
* something failed status.
*/
}
/* If we are keeping track of zephyr subscriptions, print them. */
- if (zsubs)
+ if (zsubs)
for (cur_node = zsublist.first; cur_node; cur_node = cur_node->next) {
printf("zsub: %s\n", cur_node->data);
}
if (lstat(path, &statbuf) < 0)
return (-1);
else {
- if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
+ if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
*val = TRUE;
else
*val = FALSE;
return (0);
- }
+ }
}
static krb5_error_code
enc_tkt_reply->times.starttime = starttime; /* krb524init needs this */
enc_tkt_reply->times.endtime = endtime;
#endif /* USING_HEIMDAL */
- /* NB: We will discard address for now--ignoring caddr field
+ /* NB: We will discard address for now--ignoring caddr field
in any case. MIT branch does what it always did. */
if (paddress && *paddress) {
afs_dprintf("Getting tickets: %s%s%s@%s\n", name,
(inst && inst[0]) ? "/" : "", inst ? inst : "", realm);
-
+
memset(&increds, 0, sizeof(increds));
/* ANL - instance may be ptr to a null string. Pass null then */
if ((r = krb5_build_principal(context, &increds.server,
(void *) NULL))) {
return r;
}
-
+
if (!_krb425_ccache) {
r = krb5_cc_default(context, &_krb425_ccache);
if (r)
return r;
}
-
+
increds.client = client_principal;
increds.times.endtime = 0;
/* Ask for DES since that is what V4 understands */
get_creds_enctype((&increds)) = ENCTYPE_DES_CBC_CRC;
-
+
if (keytab) {
int allowed_enctypes[] = {
ENCTYPE_DES_CBC_CRC, 0
creds /* out */);
} else {
r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
- }
+ }
return r;
}
-/*
+/*
* $Id$
*
* Copyright 1990,1991 by the Massachusetts Institute of Technology
short flags; /* useful flags */
struct sockaddr_in hostAddr[MAXHOSTSPERCELL];
/* IP addresses for cell's servers*/
- char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS];
+ char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS];
/* Names for cell's servers */
char *linkedCell; /* Linked cell name, if any */
};
int kvno, keymode = 0;
if (argc != 5) {
- if (argc == 4)
+ if (argc == 4)
keymode = 1;
else {
fprintf(stderr, "%s add: usage is '%s add <kvno> <keyfile> "
afs_com_err(argv[0], retval, "while extracting AFS service key");
exit(1);
}
-
+
#ifdef USING_HEIMDAL
#define deref_key_length(key) \
key->keyvalue.length
-
+
#define deref_key_contents(key) \
key->keyvalue.data
#else
#define deref_key_length(key) \
key->length
-
+
#define deref_key_contents(key) \
key->contents
#endif
else if (strcmp(argv[1], "list") == 0) {
struct afsconf_keys tkeys;
int i, j;
-
+
code = afsconf_GetKeys(tdir, &tkeys);
if (code) {
fprintf(stderr, "%s: failed to get keys, code %ld\n", argv[0], code);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
KLOGEXIT(code);
}
initialize_U_error_table();
- /*initialize_krb5_error_table();*/
+ /*initialize_krb5_error_table();*/
initialize_RXK_error_table();
initialize_KTC_error_table();
initialize_ACFG_error_table();
snprintf (service_temp, sizeof service_temp, "afs/%s", cellconfig->name);
if (writeTicketFile)
service = 0;
- else
+ else
service = service_temp;
klog_arg->pp = &pass;
* This file replaces some of the routines in the Kerberos utilities.
* It is based on the Kerberos library modules:
* send_to_kdc.c
- *
+ *
* Copyright 1987, 1988, 1992 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
else
strcpy(krbrlm, cellconfig->name);
for (p=krbrlm; *p; p++) {
- if (islower(*p))
+ if (islower(*p))
*p = toupper(*p);
}
} else {
if ((retval = krb5_get_host_realm(context,
cellconfig->hostName[0], &hrealms)))
- return 0;
+ return 0;
if(!hrealms[0]) return 0;
strcpy(krbrlm, hrealms[0]);
-/*
+/*
* $Id$
- *
+ *
* This file contains general linked list routines.
- *
+ *
* Copyright 1990,1991 by the Massachusetts Institute of Technology
* For distribution and copying rights, see the file "mit-copyright.h"
*/
#endif
void ll_init(linked_list *list)
- /*
+ /*
* Requires:
* List must point to a linked list structure. It is not acceptable
* to pass a null pointer to this routine.
/*
* Modifies:
* list
- * Effects:
+ * Effects:
* Adds a node to one end of the list (as specified by which_end)
* and returns a pointer to the node added. which_end is of type
- * ll_end and should be either ll_head or ll_tail as specified in
- * list.h. If there is not enough memory to allocate a node,
+ * ll_end and should be either ll_head or ll_tail as specified in
+ * list.h. If there is not enough memory to allocate a node,
* the program returns NULL.
*/
{
ll_node *node = NULL;
-
+
if ((node = (ll_node *)calloc(1, sizeof(ll_node))) != NULL) {
if (list->nelements == 0) {
list->first = node;
list->nelements++;
}
}
-
+
return(node);
}
int ll_delete_node(linked_list *list, ll_node *node)
- /*
- * Modifies:
+ /*
+ * Modifies:
* list
* Effects:
- * If node is in list, deletes node and returns LL_SUCCESS.
+ * If node is in list, deletes node and returns LL_SUCCESS.
* Otherwise, returns LL_FAILURE. If node contains other data,
* it is the responsibility of the caller to free it. Also, since
* this routine frees node, after the routine is called, "node"
switch(action) {
case ll_s_check:
/* Scan the list until we find the string in question */
- for (cur_node = list->first; cur_node && (status == FALSE);
+ for (cur_node = list->first; cur_node && (status == FALSE);
cur_node = cur_node->next)
status = (strcmp(string, cur_node->data) == 0);
break;
if (!ll_string(list, ll_s_check, string)) {
if ((cur_node = ll_add_node(list, ll_tail))) {
char *new_string;
- if ((new_string = (char *)calloc(strlen(string) + 1,
+ if ((new_string = (char *)calloc(strlen(string) + 1,
sizeof(char)))) {
strcpy(new_string, string);
ll_add_data(cur_node, new_string);
}
- else
+ else
status = LL_FAILURE;
}
else
-/*
+/*
* $Id$
*
* This is the header file for a general list linked package.
- *
+ *
* Copyright 1990,1991 by the Massachusetts Institute of Technology
* For distribution and copying rights, see the file "mit-copyright.h"
*/
#ifndef _AKLOG_SKIPWRAP_H
#define _AKLOG_SKIPWRAP_H
-int afs_krb5_skip_ticket_wrapper(char *tix, size_t tixlen, char **enc,
+int afs_krb5_skip_ticket_wrapper(char *tix, size_t tixlen, char **enc,
size_t *enclen);
#endif
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afs/afsutil.h>
/* C99 requires va_copy. Older versions of GCC provide __va_copy. Per t
- Autoconf manual, memcpy is a generally portable fallback. */
-#ifndef va_copy
+ Autoconf manual, memcpy is a generally portable fallback. */
+#ifndef va_copy
# ifdef __va_copy
-# define va_copy(d, s) __va_copy((d), (s))
+# define va_copy(d, s) __va_copy((d), (s))
# else
-# define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
+# define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
# endif
-#endif
+#endif
extern struct osi_audit_ops audit_file_ops;
#ifdef HAVE_SYS_IPC_H
time_t currenttime;
char *timeStamp;
char tbuffer[26];
-
+
/* Don't print the timestamp or thread id if we recursed */
if (rec == 0) {
currenttime = time(0);
if (num > -1)
audit_ops->append_msg("[%d] ", num);
}
-
+
audit_ops->append_msg("EVENT %s CODE %d ", audEvent, errCode);
if (afsName) {
if (vaFids) {
unsigned int i;
-
+
vaFid = vaFids->AFSCBFids_val;
-
+
if (vaFid) {
audit_ops->append_msg("FIDS %u FID %u:%u:%u ", vaFids->AFSCBFids_len, vaFid->Volume,
vaFid->Vnode, vaFid->Unique);
- for ( i = 1; i < vaFids->AFSCBFids_len; i++, vaFid++ )
+ for ( i = 1; i < vaFids->AFSCBFids_len; i++, vaFid++ )
audit_ops->append_msg("FID %u:%u:%u ", vaFid->Volume,
vaFid->Vnode, vaFid->Unique);
} else
#ifdef AFS_PTHREAD_ENV
/* i'm pretty sure all the server apps now call osi_audit_init(),
- * but to be extra careful we'll leave this assert in here for a
+ * but to be extra careful we'll leave this assert in here for a
* while to make sure */
assert(audit_lock_initialized);
#endif /* AFS_PTHREAD_ENV */
}
/* ************************************************************************** */
-/* Given a RPC call structure, this routine extracts the name and host id from the
+/* Given a RPC call structure, this routine extracts the name and host id from the
* call and includes it within the audit information.
* ************************************************************************** */
int
break;
}
}
- /* If yes, then make sure that the name is not present in
+ /* If yes, then make sure that the name is not present in
* an exclusion list */
if (lrealm_match) {
char uname[256];
lrealm_match = 0;
}
- if (!lrealm_match) {
+ if (!lrealm_match) {
if (strlen(vname) + 1 + clen >= sizeof(vname))
goto done;
strcat(vname, "@");
/* ************************************************************************** */
/* Determines whether auditing is on or off by looking at the Audit file.
- * If the string AFS_AUDIT_AllEvents is defined in the file, then auditing will be
+ * If the string AFS_AUDIT_AllEvents is defined in the file, then auditing will be
* enabled.
* ************************************************************************** */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Return an appropriate security class and index */
afs_int32
afsconf_ServerAuth(void *arock,
- struct rx_securityClass **astr,
+ struct rx_securityClass **astr,
afs_int32 *aindex)
{
struct afsconf_dir *adir = (struct afsconf_dir *) arock;
#endif /* !defined(UKERNEL) */
static afs_int32
-GenericAuth(struct afsconf_dir *adir,
- struct rx_securityClass **astr,
- afs_int32 *aindex,
+GenericAuth(struct afsconf_dir *adir,
+ struct rx_securityClass **astr,
+ afs_int32 *aindex,
rxkad_level enclevel)
{
char tbuffer[256];
* tells rxkad to encrypt the data, too.
*/
afs_int32
-afsconf_ClientAuthSecure(void *arock,
- struct rx_securityClass **astr,
+afsconf_ClientAuthSecure(void *arock,
+ struct rx_securityClass **astr,
afs_int32 *aindex)
{
struct afsconf_dir *adir = (struct afsconf_dir *) arock;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Solaris through 10 in 32 bit mode will return EMFILE if fopen can't
get an fd <= 255. We allow the fileserver to claim more fds than that.
This has always been a problem since pr_Initialize would have the same
- issue, but hpr_Initialize makes it more likely that we would see this.
+ issue, but hpr_Initialize makes it more likely that we would see this.
Work around it. This is not generic. It's coded with the needs of
afsconf_* in mind only.
{
int fd;
afsconf_FILE *iop;
-
+
if ((fd = open(fname, O_RDONLY)) == -1) {
return NULL;
}
-
+
iop = malloc(sizeof(struct afsconf_iobuffer));
if (iop == NULL) {
(void) close(fd);
afsconf_fgets(char *s, int n, afsconf_FILE *iop)
{
char *p;
-
+
p = s;
for (;;) {
char c;
-
+
if (iop->ptr == iop->endptr) {
ssize_t len;
-
+
if ((len = read(iop->_file, (void *)iop->buffer, BUFFER)) == -1) {
return NULL;
}
if (aname == NULL || aname[0] == '\0')
return -1;
-#if defined(AFS_OSF_ENV)
+#if defined(AFS_OSF_ENV)
ts = getservbyname(aname, "");
#else
ts = (struct servent *) getservbyname(aname, NULL);
char tbuffer[256];
char *start, *p;
afsconf_FILE *fp;
-
+
strcompose(tbuffer, 256, adir->name, "/", AFSDIR_THISCELL_FILE, NULL);
fp = fopen(tbuffer, "r");
if (fp == 0) {
}
/* The following procedures and structs are used on Windows only
- * to enumerate the Cell information distributed within the
+ * to enumerate the Cell information distributed within the
* Windows registry. (See src/WINNT/afsd/cm_config.c)
*/
typedef struct _cm_enumCellRegistry {
} cm_enumCellRegistry_t;
static long
-cm_serverConfigProc(void *rockp, struct sockaddr_in *addrp,
+cm_serverConfigProc(void *rockp, struct sockaddr_in *addrp,
char *hostNamep, unsigned short rank)
{
struct afsconf_cell *cellInfop = (struct afsconf_cell *)rockp;
free(newEntry);
}
return code;
-}
+}
#endif /* AFS_NT40_ENV */
return -1;
}
- /* The CellServDB file is now open.
- * The following code parses the contents of the
+ /* The CellServDB file is now open.
+ * The following code parses the contents of the
* file and creates a list with the first cell entry
* in the CellServDB file at the end of the list.
- *
+ *
* No checking is performed for duplicates.
* The side effects of this process are that duplicate
* entries appended to the end of the CellServDB file
- * take precedence and are found in a shorter period
+ * take precedence and are found in a shorter period
* of time.
*/
if (i < MAXHOSTSPERCELL) {
if (cell && !strcmp(cell, curEntry->cellInfo.name))
code =
- ParseHostLine(tbuffer,
+ ParseHostLine(tbuffer,
&curEntry->cellInfo.hostAddr[i],
- curEntry->cellInfo.hostName[i],
+ curEntry->cellInfo.hostName[i],
&clones[i]);
else
code =
- ParseHostLine(tbuffer,
+ ParseHostLine(tbuffer,
&curEntry->cellInfo.hostAddr[i],
curEntry->cellInfo.hostName[i], 0);
curEntry->cellInfo.numServers = ++i;
} else {
fprintf(stderr,
- "Too many hosts for cell %s in configuration file %s\n",
+ "Too many hosts for cell %s in configuration file %s\n",
curEntry->cellInfo.name, tbuf1);
}
}
}
#ifdef AFS_NT40_ENV
- /*
+ /*
* Windows maintains a CellServDB list in the Registry
* that supercedes the contents of the CellServDB file.
- * Prepending these entries to the head of the list
+ * Prepending these entries to the head of the list
* is sufficient to enforce the precedence.
*/
cm_EnumerateCellRegistry( enumCellRegistry.client,
/* parse a line of the form
*"128.2.1.3 #hostname" or
*"[128.2.1.3] #hostname" for clones
- * into the appropriate pieces.
+ * into the appropriate pieces.
*/
static int
ParseHostLine(char *aline, struct sockaddr_in *addr, char *aname,
}
acellInfo->timeout = 0;
- /*
+ /*
* Until we figure out how to separate out ubik server
* queries from other server queries, only perform gethostbyname()
* lookup on the specified hostnames for the client CellServDB files.
*/
- if (IsClientConfigDirectory(adir->name) &&
+ if (IsClientConfigDirectory(adir->name) &&
!(acellInfo->flags & AFSCONF_CELL_FLAG_DNS_QUERIED)) {
int j;
short numServers=0; /*Num active servers for the cell */
LOCK_GLOBAL_MUTEX;
/*
- * If a cell switch was specified in a command, then it should override the
+ * If a cell switch was specified in a command, then it should override the
* AFSCELL variable. If a cell was specified, then the afsconf_SawCell flag
* is set and the cell name in the adir structure is used.
* Read the AFSCELL var each time: in case it changes (unsetenv AFSCELL).
/* get latest key */
afs_int32
-afsconf_GetLatestKey(struct afsconf_dir * adir, afs_int32 * avno,
+afsconf_GetLatestKey(struct afsconf_dir * adir, afs_int32 * avno,
struct ktc_encryptionKey *akey)
{
int i;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct afsconf_keys *astr);
struct ktc_encryptionKey;
extern afs_int32 afsconf_GetLatestKey(struct afsconf_dir *adir,
- afs_int32 * avno,
+ afs_int32 * avno,
struct ktc_encryptionKey *akey);
extern int afsconf_GetKey(void *rock, int avno,
struct ktc_encryptionKey *akey);
/* authcon.c */
struct rx_securityClass;
-extern afs_int32 afsconf_ServerAuth(void *arock,
+extern afs_int32 afsconf_ServerAuth(void *arock,
struct rx_securityClass **,
afs_int32 *);
extern afs_int32 afsconf_ClientAuth(void *arock,
afs_int32 *);
/* writeconfig.c */
-int afsconf_SetExtendedCellInfo(struct afsconf_dir *adir, const char *apath,
+int afsconf_SetExtendedCellInfo(struct afsconf_dir *adir, const char *apath,
struct afsconf_cell *acellInfo, char clones[]);
-int afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath,
+int afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath,
struct afsconf_cell *acellInfo);
extern int afsconf_GetNoAuthFlag(struct afsconf_dir *adir);
extern void afsconf_SetNoAuthFlag(struct afsconf_dir *adir, int aflag);
extern int afsconf_DeleteUser(struct afsconf_dir *adir, char *auser);
-extern int afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an,
+extern int afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an,
char *abuffer, afs_int32 abufferLen);
extern int afsconf_AddUser(struct afsconf_dir *adir, char *aname);
extern int afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int afs_tf_get_pname(char *);
int afs_tf_get_pinst(char *);
int afs_tf_get_cred(struct ktc_principal *, struct ktc_token *);
-int afs_tf_save_cred(struct ktc_principal *, struct ktc_token *,
+int afs_tf_save_cred(struct ktc_principal *, struct ktc_token *,
struct ktc_principal *);
int afs_tf_close(void);
int afs_tf_create(char *, char *);
* be set to our identity to the server.
*/
int
-ktc_GetToken(struct ktc_principal *aserver, struct ktc_token *atoken,
+ktc_GetToken(struct ktc_principal *aserver, struct ktc_token *atoken,
int atokenLen, struct ktc_principal *aclient)
{
struct ViceIoctl iob;
* are invalid (ie. when deciding whether afs_tf_init has been
* called.)
* c. In tf_close, be sure it gets reinitialized to a negative
- * number.
+ * number.
*/
static int fd = -1;
static int curpos; /* Position in tfbfr */
* afs_tf_close() closes the ticket file and releases the lock.
*
* tf_gets() returns the next null-terminated string. It's an internal
- * routine used by afs_tf_get_pname(), afs_tf_get_pinst(), and
+ * routine used by afs_tf_get_pname(), afs_tf_get_pinst(), and
* afs_tf_get_cred().
*
* tf_read() reads a given number of bytes. It's an internal routine
/*
* afs_tf_init() should be called before the other ticket file routines.
* It takes the name of the ticket file to use, "tf_name", and a
- * read/write flag "rw" as arguments.
+ * read/write flag "rw" as arguments.
*
* It tries to open the ticket file, checks the mode, and if everything
* is okay, locks the file. If it's opened for reading, the lock is
- * shared. If it's opened for writing, the lock is exclusive.
+ * shared. If it's opened for writing, the lock is exclusive.
*
- * Returns 0 if all went well, otherwise one of the following:
+ * Returns 0 if all went well, otherwise one of the following:
*
* NO_TKT_FIL - file wasn't there
* TKT_FIL_ACC - file was in wrong mode, etc.
* If "wflag" is set, open the ticket file in append-writeonly mode
* and lock the ticket file in exclusive mode. If unable to lock
* the file, sleep and try again. If we fail again, return with the
- * proper error message.
+ * proper error message.
*/
curpos = sizeof(tfbfr);
}
/*
* Otherwise "wflag" is not set and the ticket file should be opened
- * for read-only operations and locked for shared access.
+ * for read-only operations and locked for shared access.
*/
fd = open(tf_name, O_RDONLY, 0600);
* principal's name is filled into the "p" parameter. If all goes well,
* 0 is returned. If afs_tf_init() wasn't called, TKT_FIL_INI is
* returned. If the name was null, or EOF was encountered, or the name
- * was longer than MAXKTCNAMELEN, TKT_FIL_FMT is returned.
+ * was longer than MAXKTCNAMELEN, TKT_FIL_FMT is returned.
*/
int
* goes well, 0 is returned. If afs_tf_init() wasn't called,
* TKT_FIL_INI is returned. If EOF was encountered, or the instance
* was longer than MAXKTCNAMELEN, TKT_FIL_FMT is returned. Note that the
- * instance may be null.
+ * instance may be null.
*/
int
/*
* afs_tf_get_cred() reads a CREDENTIALS record from a ticket file and fills
* in the given structure "c". It should only be called after afs_tf_init(),
- * afs_tf_get_pname(), and afs_tf_get_pinst() have been called. If all goes
- * well, 0 is returned. Possible error codes are:
+ * afs_tf_get_pname(), and afs_tf_get_pinst() have been called. If all goes
+ * well, 0 is returned. Possible error codes are:
*
* TKT_FIL_INI - afs_tf_init wasn't called first
* TKT_FIL_FMT - bad format
*/
int
-afs_tf_save_cred(struct ktc_principal *aserver,
- struct ktc_token *atoken,
+afs_tf_save_cred(struct ktc_principal *aserver,
+ struct ktc_token *atoken,
struct ktc_principal *aclient)
{
char realm[MAXKTCREALMLEN + 1];
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* user name is here */
- /* check that ticket will fit
+ /* check that ticket will fit
* this compares the size of the ktc_token allocated by the app
* which might be smaller than the current definition of MAXKTCTICKETLEN
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <errno.h>
#include <string.h>
#include <ctype.h>
-
+
#include <rx/xdr.h>
#include <rx/rx.h>
#include <stdio.h>
/* returns nth super user from the UserList file */
int
-afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an, char *abuffer,
+afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an, char *abuffer,
afs_int32 abufferLen)
{
char tbuffer[256];
}
/* special CompFindUser routine that builds up a princ and then
- calls finduser on it. If found, returns char * to user string,
+ calls finduser on it. If found, returns char * to user string,
otherwise returns NULL. The resulting string should be immediately
copied to other storage prior to release of mutex. */
static char *
-CompFindUser(struct afsconf_dir *adir, char *name, char *sep, char *inst,
+CompFindUser(struct afsconf_dir *adir, char *name, char *sep, char *inst,
char *realm)
{
static char fullname[MAXKTCNAMELEN + MAXKTCNAMELEN + MAXKTCREALMLEN + 3];
}
}
- /* If yes, then make sure that the name is not present in
+ /* If yes, then make sure that the name is not present in
* an exclusion list */
if (lrealm_match) {
if (tinst[0])
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
int
-afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath,
+afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath,
struct afsconf_cell *acellInfo)
{
afs_int32 code;
}
int
-afsconf_SetExtendedCellInfo(struct afsconf_dir *adir,
- const char *apath,
+afsconf_SetExtendedCellInfo(struct afsconf_dir *adir,
+ const char *apath,
struct afsconf_cell *acellInfo, char clones[])
{
afs_int32 code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*abp = tb;
tb->type = type;
- /* The fs_create above calls bnode_InitBnode() which always sets the
+ /* The fs_create above calls bnode_InitBnode() which always sets the
** fileGoal to BSTAT_NORMAL .... overwrite it with whatever is passed into
** this function as a parameter... */
tb->fileGoal = fileGoal;
ec = setsid();
#elif defined(AFS_DARWIN90_ENV)
ec = setpgid(0, 0);
-#elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV)
+#elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV)
ec = setpgrp();
#else
ec = setpgrp(0, 0);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int (*delete) ( struct bnode * );
int (*procexit) ( struct bnode *, struct bnode_proc * );
int (*getstring) ( struct bnode *, char *abuffer, afs_int32 alen );
- int (*getparm) ( struct bnode *, afs_int32 aindex, char *abuffer,
+ int (*getparm) ( struct bnode *, afs_int32 aindex, char *abuffer,
afs_int32 alen);
int (*restartp) ( struct bnode *);
int (*hascore) ( struct bnode *);
char killSent; /* have we tried sigkill signal? */
};
-/* this struct is used to construct a list of dirpaths, along with
- * their recommended permissions
+/* this struct is used to construct a list of dirpaths, along with
+ * their recommended permissions
*/
struct bozo_bosEntryStats {
const char *path; /* pathname to check */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afs/volser.h>
static int IStatServer(struct cmd_syndesc *as, int int32p);
-static int DoStat(char *aname, struct rx_connection *aconn,
+static int DoStat(char *aname, struct rx_connection *aconn,
int aint32p, int firstTime);
#include "bosint.h"
#define PARMBUFFERSSIZE 32
static afs_int32
-DoSalvage(struct rx_connection * aconn, char * aparm1, char * aparm2,
- char * aoutName, afs_int32 showlog, char * parallel,
- char * atmpDir, char * orphans, int dafs,
+DoSalvage(struct rx_connection * aconn, char * aparm1, char * aparm2,
+ char * aoutName, afs_int32 showlog, char * parallel,
+ char * atmpDir, char * orphans, int dafs,
struct MRAFSSalvageParms * mrafsParm)
{
afs_int32 code;
/* For DAFS, specifying a single volume does not result in a standard
* salvager call. Instead, it simply results in a SALVSYNC call to the
* online salvager daemon. This interface does not give us the same rich
- * set of call flags. Thus, we skip these steps for DAFS single-volume
+ * set of call flags. Thus, we skip these steps for DAFS single-volume
* calls */
if (!dafs || (*aparm2 == 0)) {
/* add the parallel option if given */
if (mrafsParm->OptRxDebug)
strcat(tbuffer, " -rxdebug");
if (mrafsParm->OptResidencies) {
- sprintf(pbuffer, " -Residencies %lu",
+ sprintf(pbuffer, " -Residencies %lu",
afs_printable_uint32_lu(mrafsParm->OptResidencies));
strcat(tbuffer, pbuffer);
}
}
static int
-DoStat(IN char *aname,
- IN struct rx_connection *aconn,
- IN int aint32p,
+DoStat(IN char *aname,
+ IN struct rx_connection *aconn,
+ IN int aint32p,
IN int firstTime) /* true iff first instance in cmd */
{
afs_int32 temp;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
-/*
+/*
* Copyright (C) 1989 by the Massachusetts Institute of Technology
- *
+ *
* Export of software employing encryption from the United States of
* America is assumed to require a specific license from the United
* States Government. It is the responsibility of any person or
* organization contemplating export to obtain such a license before
* exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
afs_int32
-SBOZO_GetDates(struct rx_call *acall, char *aname, afs_int32 *atime,
+SBOZO_GetDates(struct rx_call *acall, char *aname, afs_int32 *atime,
afs_int32 *abakTime, afs_int32 *aoldTime)
{
struct stat tstat;
}
afs_int32
-SBOZO_ListKeys(struct rx_call *acall, afs_int32 an, afs_int32 *akvno,
+SBOZO_ListKeys(struct rx_call *acall, afs_int32 an, afs_int32 *akvno,
struct bozo_key *akey, struct bozo_keyInfo *akeyinfo)
{
struct afsconf_keys tkeys;
noauth = afsconf_GetNoAuthFlag(bozo_confdir);
rxkad_GetServerInfo(acall->conn, &enc_level, 0, 0, 0, 0, 0);
- /*
+ /*
* only return actual keys in noauth or if this is an encrypted connection
*/
}
afs_int32
-SBOZO_CreateBnode(struct rx_call *acall, char *atype, char *ainstance,
+SBOZO_CreateBnode(struct rx_call *acall, char *atype, char *ainstance,
char *ap1, char *ap2, char *ap3, char *ap4, char *ap5,
char *notifier)
{
}
afs_int32
-SBOZO_GetStatus(struct rx_call *acall, char *ainstance, afs_int32 *astat,
+SBOZO_GetStatus(struct rx_call *acall, char *ainstance, afs_int32 *astat,
char **astatDescr)
{
struct bnode *tb;
eifunc(struct bnode *abnode, void *param)
{
struct eidata *arock = (struct eidata *)param;
-
+
if (arock->counter-- == 0) {
/* done */
strcpy(arock->iname, abnode->name);
}
afs_int32
-SBOZO_EnumerateInstance(struct rx_call *acall, afs_int32 anum,
+SBOZO_EnumerateInstance(struct rx_call *acall, afs_int32 anum,
char **ainstance)
{
struct eidata tdata;
sizeof(bozo_bosEntryStats) / sizeof(bozo_bosEntryStats[0]);
/* This function performs initialization of the bozo_bosEntrystats[]
- * array. This array contains the list of dirs that the bosserver
+ * array. This array contains the list of dirs that the bosserver
* is interested in along with their recommended permissions
* NOTE: This initialization is a bit ugly. This was caused because
* the path names require procedural as opposed to static initialization.
if (!StatEachEntry(e)) {
bozo_Log("unhappy with %s which is a %s that should "
"have at least rights %o, at most rights %o %s\n",
- e->path, e->dir ? "dir" : "file", e->reqPerm,
- (~e->proPerm & 0777),
+ e->path, e->dir ? "dir" : "file", e->reqPerm,
+ (~e->proPerm & 0777),
e->rootOwner ? ", owned by root" : "");
result = 0;
break;
}
afs_int32
-SBOZO_GetInstanceStrings(struct rx_call *acall, char *abnodeName,
+SBOZO_GetInstanceStrings(struct rx_call *acall, char *abnodeName,
char **as1, char **as2, char **as3, char **as4)
{
struct bnode *tb;
/* bnode.c */
int bnode_CoreName(struct bnode *abnode, char *acoreName, char *abuffer);
int bnode_GetString(struct bnode *abnode, char *abuffer, afs_int32 alen);
-int bnode_GetParm(struct bnode *abnode, afs_int32 aindex, char *abuffer,
+int bnode_GetParm(struct bnode *abnode, afs_int32 aindex, char *abuffer,
afs_int32 alen);
int bnode_GetStat(struct bnode *abnode, afs_int32 * astatus);
int bnode_RestartP(struct bnode *abnode);
int WriteBozoFile(char *aname);
/* bosoprocs.c */
-int GetRequiredDirPerm(const char *path);
+int GetRequiredDirPerm(const char *path);
void *bozo_ShutdownAndExit(void *arock /* really int asignal */);
int initBosEntryStats(void);
int DirAccessOK(void);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* fundamental errors occur.
*
* This routine requires
- *
+ *
* #include <sys/types.h>
* #include <sys/stat.h>
* #include <fcntl.h>
static void
background(void)
{
- /*
+ /*
* A process is a process group leader if its process ID
* (getpid()) and its process group ID (getpgrp()) are the same.
*/
struct sigaction nsa;
/* for some reason, this permits user-mode RX to run a lot faster.
- * we do it here in the bosserver, so we don't have to do it
+ * we do it here in the bosserver, so we don't have to do it
* individually in each server.
*/
tweak_config();
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
}
else if (!strcmp(argv[code], "-rxmaxmtu")) {
if ((code + 1) >= argc) {
- fprintf(stderr, "missing argument for -rxmaxmtu\n");
- exit(1);
+ fprintf(stderr, "missing argument for -rxmaxmtu\n");
+ exit(1);
}
rxMaxMTU = atoi(argv[++code]);
- if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
+ if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%" AFS_SIZET_FMT "\n",
- rxMaxMTU, RX_MIN_PACKET_SIZE,
+ rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
exit(1);
}
fflush(stdout);
#endif
- /* go into the background and remove our controlling tty, close open
+ /* go into the background and remove our controlling tty, close open
file desriptors
*/
if ((!DoSyslog)
#ifndef AFS_NT40_ENV
- && ((lstat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
+ && ((lstat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
!(S_ISFIFO(sb.st_mode)))
#endif
) {
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
- if (ccode == 1)
+ if (ccode == 1)
host = SHostAddrs[0];
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
static int
-cron_delete(struct bnode *bn)
+cron_delete(struct bnode *bn)
{
struct cronbnode *abnode = (struct cronbnode *)bn;
free(abnode->command);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
ez_delete(struct bnode *bn)
{
struct ezbnode *abnode = (struct ezbnode *)bn;
-
+
free(abnode->command);
free(abnode);
return 0;
}
struct bnode *
-ez_create(char *ainstance, char *acommand, char *unused1, char *unused2,
+ez_create(char *ainstance, char *acommand, char *unused1, char *unused2,
char *unused3, char *unused4)
{
struct ezbnode *te;
ez_timeout(struct bnode *bn)
{
struct ezbnode *abnode = (struct ezbnode *)bn;
-
+
if (!abnode->waitingForShutdown)
return 0; /* spurious */
/* send kill and turn off timer */
ez_getstat(struct bnode *bn, afs_int32 * astatus)
{
struct ezbnode *abnode = (struct ezbnode *)bn;
-
+
afs_int32 temp;
if (abnode->waitingForShutdown)
temp = BSTAT_SHUTTINGDOWN;
ez_setstat(struct bnode *bn, afs_int32 astatus)
{
struct ezbnode *abnode = (struct ezbnode *)bn;
-
+
struct bnode_proc *tp;
afs_int32 code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* basic rules:
Normal operation involves having the file server and the vol server both running.
-
+
If the vol server terminates, it can simply be restarted.
-
+
If the file server terminates, the disk must salvaged before the file server
can be restarted. In order to restart either the file server or the salvager,
the vol server must be shut down.
-
+
If the file server terminates *normally* (exits after receiving a SIGQUIT)
then we don't have to salvage it.
-
+
The needsSalvage flag is set when the file server is started. It is cleared
if the file server exits when fileSDW is true but fileKillSent is false,
indicating that it exited after receiving a quit, but before we sent it a kill.
-
+
The needsSalvage flag is cleared when the salvager exits.
*/
char needsClock; /* do we need clock ticks */
};
-struct bnode * fs_create(char *ainstance, char *afilecmd, char *avolcmd,
+struct bnode * fs_create(char *ainstance, char *afilecmd, char *avolcmd,
char *asalcmd, char *ascancmd, char *dummy);
-struct bnode * dafs_create(char *ainstance, char *afilecmd, char *avolcmd,
+struct bnode * dafs_create(char *ainstance, char *afilecmd, char *avolcmd,
char * asalsrvcmd, char *asalcmd, char *ascancmd);
static int fs_hascore(struct bnode *abnode);
static int fs_setstat(struct bnode *abnode, afs_int32 astatus);
static int fs_procexit(struct bnode *abnode, struct bnode_proc *aproc);
static int fs_getstring(struct bnode *abnode, char *abuffer, afs_int32 alen);
-static int fs_getparm(struct bnode *abnode, afs_int32 aindex,
+static int fs_getparm(struct bnode *abnode, afs_int32 aindex,
char *abuffer, afs_int32 alen);
-static int dafs_getparm(struct bnode *abnode, afs_int32 aindex,
+static int dafs_getparm(struct bnode *abnode, afs_int32 aindex,
char *abuffer, afs_int32 alen);
static int SetSalFlag(struct fsbnode *abnode, int aflag);
fs_delete(struct bnode *bn)
{
struct fsbnode *abnode = (struct fsbnode *)bn;
-
+
free(abnode->filecmd);
free(abnode->volcmd);
free(abnode->salcmd);
int bailout = 0;
fileCmdpath = volCmdpath = salCmdpath = scanCmdpath = NULL;
- te = NULL;
-
+ te = NULL;
+
/* construct local paths from canonical (wire-format) paths */
if (ConstructLocalBinPath(afilecmd, &fileCmdpath)) {
bozo_Log("BNODE: command path invalid '%s'\n", afilecmd);
bailout = 1;
goto done;
}
- bnode_SetTimeout(fsbnode2bnode(te), POLLTIME);
+ bnode_SetTimeout(fsbnode2bnode(te), POLLTIME);
/* ask for timeout activations every 10 seconds */
RestoreSalFlag(te); /* restore needsSalvage flag based on file's existence */
SetNeedsClock(te); /* compute needsClock field */
/* create a demand attach fs bnode */
struct bnode *
-dafs_create(char *ainstance, char *afilecmd, char *avolcmd,
+dafs_create(char *ainstance, char *afilecmd, char *avolcmd,
char * asalsrvcmd, char *asalcmd, char *ascancmd)
{
struct stat tstat;
fileCmdpath = volCmdpath = salsrvCmdpath = salCmdpath = scanCmdpath = NULL;
te = NULL;
-
+
/* construct local paths from canonical (wire-format) paths */
if (ConstructLocalBinPath(afilecmd, &fileCmdpath)) {
bozo_Log("BNODE: command path invalid '%s'\n", afilecmd);
bailout = 1;
goto done;
}
- bnode_SetTimeout(fsbnode2bnode(te), POLLTIME);
+ bnode_SetTimeout(fsbnode2bnode(te), POLLTIME);
/* ask for timeout activations every 10 seconds */
RestoreSalFlag(te); /* restore needsSalvage flag based on file's existence */
SetNeedsClock(te); /* compute needsClock field */
fs_timeout(struct bnode *bn)
{
struct fsbnode *abnode = (struct fsbnode *)bn;
-
+
afs_int32 now;
now = FT_ApproxTime();
fs_getstat(struct bnode *bn, afs_int32 * astatus)
{
struct fsbnode *abnode = (struct fsbnode *) bn;
-
+
afs_int32 temp;
if (abnode->volSDW || abnode->fileSDW || abnode->salSDW
|| abnode->scanSDW || abnode->salsrvSDW)
fs_procexit(struct bnode *bn, struct bnode_proc *aproc)
{
struct fsbnode *abnode = (struct fsbnode *)bn;
-
+
/* process has exited */
if (aproc == abnode->volProc) {
fs_getstring(struct bnode *bn, char *abuffer, afs_int32 alen)
{
struct fsbnode *abnode = (struct fsbnode *)bn;
-
+
if (alen < 40)
return -1;
if (abnode->b.goal == 1) {
afs_int32 alen)
{
struct fsbnode *abnode = (struct fsbnode *)bn;
-
+
if (aindex == 0)
strcpy(abuffer, abnode->filecmd);
else if (aindex == 1)
afs_int32 alen)
{
struct fsbnode *abnode = (struct fsbnode *)bn;
-
+
if (aindex == 0)
strcpy(abuffer, abnode->filecmd);
else if (aindex == 1)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define RX_SCINDEX_VAB 1 /* vice tokens, with bcrypt */
#define RX_SCINDEX_KAD 2 /* Kerberos/DES */
-/* maximums for various text strings
+/* maximums for various text strings
* DON'T alter these values until all disk/tape structures can be handled
* correctly. In particular, volume names are 64.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
package TC_
prefix S
statindex 4
-
+
/*
#define TCPERFORMDUMP 100
#define TCPERFORMRESTORE 101
const TC_MAXHOSTLEN = 32; /*for server/machine names */
const TC_MAXTAPELEN = 32; /*max tape name allowed */
/*This specifies the interface to the tape coordinator*/
-/*describes the information that should be dumped to dump a single
+/*describes the information that should be dumped to dump a single
volume*/
-struct tc_dumpDesc
+struct tc_dumpDesc
{
afs_int32 vid; /* volume to dump */
afs_int32 vtype; /* volume type */
OUT afs_int32 *dumpID);
/* Start a restore, given a dump set name, a tape set name and the volumes to
- * dump.
+ * dump.
*/
proc PerformRestore(IN string dumpSetName<TC_MAXNAMELEN>,
tc_restoreArray *restores,
/* check the status of a dump; the tape coordinator is assumed to sit on
* the status of completed dumps for a reasonable period (2 - 12 hours)
- * so that they can be examined later
+ * so that they can be examined later
*/
/*
* proc CheckDump(IN afs_int32 dumpID, OUT struct tc_dumpStat *status);
*/
/* abort a dump */
-/*
+/*
* proc AbortDump(IN afs_int32 dumpID);
*/
-/* this call waits for a dump to complete; it ties up an LWP on the tape
+/* this call waits for a dump to complete; it ties up an LWP on the tape
coordinator */
/*
* proc WaitForDump(IN afs_int32 dumpID);
* proc EndDump(IN afs_int32 dumpID);
*/
-/*
+/*
* proc GetTMInfo(OUT struct tc_TMInfo *info);
*/
proc ReadLabel
( OUT struct tc_tapeLabel *label,
- OUT afs_uint32 *taskId
+ OUT afs_uint32 *taskId
);
proc ScanDumps
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32(*dismount) (struct butm_tapeInfo *);
afs_int32(*create) (struct butm_tapeInfo *, struct butm_tapeLabel *,
afs_int32);
- afs_int32(*readLabel) (struct butm_tapeInfo *,
+ afs_int32(*readLabel) (struct butm_tapeInfo *,
struct butm_tapeLabel *,
afs_int32);
afs_int32(*seek) (struct butm_tapeInfo *, afs_int32);
afs_int32(*seekEODump) (struct butm_tapeInfo *, afs_int32);
afs_int32(*readFileBegin) (struct butm_tapeInfo *);
- afs_int32(*readFileData) (struct butm_tapeInfo *, char *, int len,
+ afs_int32(*readFileData) (struct butm_tapeInfo *, char *, int len,
int *);
afs_int32(*readFileEnd) (struct butm_tapeInfo *);
afs_int32(*writeFileBegin) (struct butm_tapeInfo *);
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
ec BUTX_INVALIDBSANAME, "XBSA invalid bsaObjectOwner specified"
ec BUTX_INVALIDAPPNAME, "XBSA invalid appObjectOwner specified"
ec BUTX_INVALIDSECTOKEN, "XBSA invalid secToken specified"
- ec BUTX_INVALIDOBJECTSPNAME, "XBSA invalid objectSpaceName specified"
+ ec BUTX_INVALIDOBJECTSPNAME, "XBSA invalid objectSpaceName specified"
ec BUTX_INVALIDPATHNAME, "XBSA invalid pathName specified"
ec BUTX_INVALIDBUFFERSIZE, "XBSA invalid bufferSize specified"
ec BUTX_INVALIDDATABUFFER, "XBSA invalid dataBuffer specified"
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* A task not started yet - check its start time */
if (localTaskFlags & STARTING || atTime) {
/*
- * Start a timed dump if its time has come. When the job is
- * started, it will allocate its own status structure so this
- * one is no longer needed: delete it.
+ * Start a timed dump if its time has come. When the job is
+ * started, it will allocate its own status structure so this
+ * one is no longer needed: delete it.
*
- * Avoid multiple processes trouncing the cmdLine by placing
+ * Avoid multiple processes trouncing the cmdLine by placing
* lock around it.
*/
if (atTime && (atTime <= time(0))) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
ec BC_VOLSETEXISTS, "Volume set already exists"
# general
- ec BC_NOHOST, "No such server"
+ ec BC_NOHOST, "No such server"
ec BC_NOPARTITION, "No such partition"
ec BC_VERSIONFAIL, "Version number mismatch"
/* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
static int DBLookupByVolume(char *volumeName);
int
-bc_EvalVolumeSet(struct bc_config *aconfig,
- struct bc_volumeSet *avs,
- struct bc_volumeDump **avols,
+bc_EvalVolumeSet(struct bc_config *aconfig,
+ struct bc_volumeSet *avs,
+ struct bc_volumeDump **avols,
struct ubik_client *uclient)
{ /*bc_EvalVolumeSet */
int code = -1;
};
afs_int32
-getSPEntries(afs_uint32 server, afs_int32 partition,
- struct serversort **serverlist,
- struct serversort **ss,
+getSPEntries(afs_uint32 server, afs_int32 partition,
+ struct serversort **serverlist,
+ struct serversort **ss,
struct partitionsort **ps)
{
if (!(*ss) || ((*ss)->ipaddr != server)) {
}
afs_int32
-randSPEntries(struct serversort *serverlist,
+randSPEntries(struct serversort *serverlist,
struct bc_volumeDump **avols)
{
struct serversort *ss, **pss;
}
static int
-EvalVolumeSet2(struct bc_config *aconfig,
- struct bc_volumeSet *avs,
- struct bc_volumeDump **avols,
+EvalVolumeSet2(struct bc_config *aconfig,
+ struct bc_volumeSet *avs,
+ struct bc_volumeDump **avols,
struct ubik_client *uclient)
{ /*EvalVolumeSet2 */
struct bc_volumeEntry *tve;
/* For each of the volume set entries - collect the volumes that match it */
for (tve = avs->ventries; tve; tve = tve->next) {
- /* Put together a call to the vlserver for this vlentry. The
+ /* Put together a call to the vlserver for this vlentry. The
* performance gain is from letting the vlserver expand the
* volumeset and not this routine.
*/
* EvalVolumeSetOld
*
* Description:
- * Takes the entries in a volumeset and expands them into a list of
+ * Takes the entries in a volumeset and expands them into a list of
* volumes. Every VLDB volume entry is looked at and compared to the
* volumeset entries.
*
- * When matching a VLDB volume entry to a volumeset entry,
+ * When matching a VLDB volume entry to a volumeset entry,
* 1. If the RW volume entry matches, that RW volume is used.
* 2. Otherwise, if the BK volume entry matches, the BK volume is used.
* 3. Finally, if the RO volume entry matches, the RO volume is used.
- * For instance: A volumeset entry of ".* .* user.t.*" will match volume
- * "user.troy" and "user.troy.backup". The rules will use
+ * For instance: A volumeset entry of ".* .* user.t.*" will match volume
+ * "user.troy" and "user.troy.backup". The rules will use
* the RW volume "user.troy".
*
* When a VLDB volume entry matches a volumeset entry (be it RW, BK or RO),
- * that volume is used and matches against any remaining volumeset entries
+ * that volume is used and matches against any remaining volumeset entries
* are not even done.
* For instance: A 1st volumeset entry ".* .* .*.backup" will match with
- * "user.troy.backup". Its 2nd volumeset entry ".* .* .*"
- * would have matched its RW volume "user.troy", but the first
+ * "user.troy.backup". Its 2nd volumeset entry ".* .* .*"
+ * would have matched its RW volume "user.troy", but the first
* match is used and the second match isn't even done.
*
* Arguments:
* aconfig : Global configuration info.
- * avs :
+ * avs :
* avols : Ptr to linked list of entries describing volumes to dump.
* uclient : Ptr to Ubik client structure.
*
*-----------------------------------------------------------------------------
*/
static int
-EvalVolumeSet1(struct bc_config *aconfig,
+EvalVolumeSet1(struct bc_config *aconfig,
struct bc_volumeSet *avs,
- struct bc_volumeDump **avols,
+ struct bc_volumeDump **avols,
struct ubik_client *uclient)
{ /*EvalVolumeSet1 */
afs_int32 code; /*Result of various calls */
}
}
- /* If the BK name matches the volume set entry, take
+ /* If the BK name matches the volume set entry, take
* it and exit. Second choice is to use the BK volume.
*/
if (entry.flags & BACK_EXISTS) {
}
/* concatParams
- *
+ *
* Concatenates the parameters of an option and returns the string.
*
*/
/* printIfStatus
* print out an interface status node as received from butc
*/
-
+
void
printIfStatus(struct tciStatusS *statusPtr)
{
}
}
- /*
+ /*
* Now print the scheduled dumps.
*/
if (!dlqEmpty(&statusHead) && as)
oldFlag = 0;
/* Read all the port offsets into the ports array. The first element in the
- * array is for full restore and the rest are for incremental restores
+ * array is for full restore and the rest are for incremental restores
*/
if (as->parms[5].items) {
for (ti = as->parms[5].items; ti; ti = ti->next)
if (dumpID <= 0)
dumpID = 0;
}
-
+
/*
* Perform the call to start the restore.
*/
/* parm 0 is the server to restore
* parm 1 is the partition to restore
-
+
* parm 8 and above as in VolRestoreCmd:
* parm 8 is the new server to restore to
* parm 9 is the new partition to restore to
return (-1);
}
- /* Since we want only RW volumes, remove any
+ /* Since we want only RW volumes, remove any
* BK or RO volumes from the list.
*/
for (prev = 0, tvol = volsToRestore; tvol; tvol = nextvol) {
return (code);
}
- /*
+ /*
* Some parameters cannot be specified together
- * The "-file" option cannot exist with the "-volume", "-dump",
- * "-portoffset", or "-append" option
+ * The "-file" option cannot exist with the "-volume", "-dump",
+ * "-portoffset", or "-append" option
*/
if (as->parms[6].items) {
loadfile = 1;
}
}
- /*
+ /*
* Get the time we are to perform this dump
*/
if (as->parms[3].items) {
dontExecute = (as->parms[5].items ? 1 : 0); /* -n */
- /*
+ /*
* If this dump is not a load file, then check the parameters.
*/
if (!loadfile) { /*6 */
/*6 */
/*
- * If given the "-at" option, then add this to the jobs list and return
+ * If given the "-at" option, then add this to the jobs list and return
* with no error.
*
* Create a status node for this timed dump.
* Fill in the time to dump and the cmd line for the dump leaving off
- * the -at option. If the -n option is there, it is scheduled with
+ * the -at option. If the -n option is there, it is scheduled with
* the Timed dump as opposed to not scheduling the time dump at all.
*/
if (doAt) {
return (0);
}
- /*
+ /*
* Read and execute the load file if specified. The work of reading is done
* in the main routine prior the dispatch call. loadFile and dontExecute are
* global variables so this can take place in main.
return 0;
}
- /*
+ /*
* We are doing a real dump (no load file or timed dump).
*/
printf("Starting dump of volume set '%s' (dump level '%s')\n", vsName,
}
/* We found the most recent dump at this level. Now check
- * if we should use it by seeing if its full dump hierarchy
+ * if we should use it by seeing if its full dump hierarchy
* exists. If it doesn't, we don't want to base our incremental
- * off of this dump.
+ * off of this dump.
*/
if (!parent || (dumpEntry.id > parent)) {
/* Follow the parent dumps to see if they are all there */
}
}
- /* If the problemflag was raise, it means we are not doing the
+ /* If the problemflag was raise, it means we are not doing the
* dump at the level we requested it be done at.
*/
if (problemFindingDump) {
*/
afs_int32
-bc_ParseExpiration(struct cmd_parmdesc *paramPtr, afs_int32 *expType,
+bc_ParseExpiration(struct cmd_parmdesc *paramPtr, afs_int32 *expType,
afs_int32 *expDate)
{
struct cmd_item *itemPtr;
/* If dump is to an XBSA server, connect to butc and send it
* the dump to delete. Butc will contact the XBSA server.
- * The dump will not be an appended dump because XBSA butc
+ * The dump will not be an appended dump because XBSA butc
* does not support the append option.
*/
if (xbsadump && dumpEntry.nVolumes) {
}
/* ----------------------------------
- * supporting routines for database examination
+ * supporting routines for database examination
* ----------------------------------
*/
return (code);
}
-/* bc_dumpInfoCmd
+/* bc_dumpInfoCmd
* list the dumps and contens of the dumps.
* params:
* as - name of tape
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* unlink the item on the front of the queue
*/
-dlqlinkP dlqUnlinkf(dlqlinkP headptr)
+dlqlinkP dlqUnlinkf(dlqlinkP headptr)
{
dlqlinkP ptr;
DLQ_ASSERT_HEAD(headptr);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* OpenTape
- * notes:
+ * notes:
* non-static for recoverDB
*/
/* ScanDumpHdr
* scan a dump header out of a dump file, leaving the file ptr set after
- * the header.
+ * the header.
* entry:
* afile - ptr to file, for reading.
* various - ptrs for return values
return -1;
code =
sscanf(tbuffer, "%d %d %s %s %ld %ld %ld %ld", &dbmagic, &dbversion,
- aname, dumpName, (long int *) aparent, (long int *) aincTime,
+ aname, dumpName, (long int *) aparent, (long int *) aincTime,
(long int *) acreateTime, (long int *) alevel);
if (code != 8)
return -1;
tp = fgets(tbuffer, sizeof(tbuffer), afile);
if (!tp)
return -1;
- code = sscanf(tbuffer, "%ld %ld %ld", (long int *)adumpID,
+ code = sscanf(tbuffer, "%ld %ld %ld", (long int *)adumpID,
(long int *)aseq, (long int *)adamage);
if (code != 3)
return -1;
return 1; /* eof */
}
code =
- sscanf(tbuffer, "%s %ld %s %ld %ld %ld %ld", avolName,
- (long int *) avolID, atapeName, (long int *)apos,
- (long int *) aseq, (long int *) alastp,
+ sscanf(tbuffer, "%s %ld %s %ld %ld %ld %ld", avolName,
+ (long int *) avolID, atapeName, (long int *)apos,
+ (long int *) aseq, (long int *) alastp,
(long int *) cloneTime);
if (code != 7)
return -1; /* bad input line */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afs/bubasics.h>
#include "bc.h"
#include "bucoord_internal.h"
-
+
struct ubik_client *cstructp; /*Ptr to Ubik client structure */
static int FreeVolumeEntryList(struct bc_volumeEntry *aentry);
}
int
-bc_AddVolumeItem(struct bc_config *aconfig, char *avolName, char *ahost,
+bc_AddVolumeItem(struct bc_config *aconfig, char *avolName, char *ahost,
char *apart, char *avol)
{
struct bc_volumeSet *tset;
* expType - absolute or relative
*/
-int
-bc_CreateDumpSchedule(struct bc_config *aconfig, char *adumpName,
+int
+bc_CreateDumpSchedule(struct bc_config *aconfig, char *adumpName,
afs_int32 expDate, afs_int32 expType)
{
struct bc_dumpSchedule *tdump;
* to strange places), so we must call bc_ProcessDumpSchedule when we're done.
*/
int
-bc_DeleteDumpScheduleAddr(struct bc_config *aconfig,
+bc_DeleteDumpScheduleAddr(struct bc_config *aconfig,
struct bc_dumpSchedule *adumpAddr)
{
struct bc_dumpSchedule **tlast, *tdump;
*/
int
-FindDump(struct bc_config *aconfig, char *nodeString,
- struct bc_dumpSchedule **parentptr,
+FindDump(struct bc_config *aconfig, char *nodeString,
+ struct bc_dumpSchedule **parentptr,
struct bc_dumpSchedule **nodeptr)
{
struct bc_dumpSchedule *dsptr;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* bc_Dumper
* called (indirectly) to make a dump
* entry:
- * aindex - index into dumpTask array, contains all the information
+ * aindex - index into dumpTask array, contains all the information
* relevant to the dump
*/
int
return (code);
/* count number of volumes to be dumped and
- * build array of volumes to be sent to backup system
+ * build array of volumes to be sent to backup system
*/
for (count = 0, tde = dumpTaskPtr->volumes; tde;
tde = tde->next, count++);
}
/* bc_DmpRstStart
- * The other half of the dump/restore create process call. In bc_StartDmpRst,
+ * The other half of the dump/restore create process call. In bc_StartDmpRst,
* we allocated a dumpTask entry. Here we do the task and then free the entry.
*/
void *
/* bc_StartDmpRst
* function to start dump running. Packages the relevant information
* (from params) into any free dumpTask structure (globally allocated),
- * and then invokes bc_DmpRstStart to do the work, passing it a single
+ * and then invokes bc_DmpRstStart to do the work, passing it a single
* parameter, the index into the dumpTask array.
*
* entry:
*/
int
-bc_StartDmpRst(struct bc_config *aconfig, char *adname, char *avname,
- struct bc_volumeDump *avolsToDump,
+bc_StartDmpRst(struct bc_config *aconfig, char *adname, char *avname,
+ struct bc_volumeDump *avolsToDump,
struct sockaddr_in *adestServer,
- afs_int32 adestPartition, afs_int32 afromDate, char *anewExt,
+ afs_int32 adestPartition, afs_int32 afromDate, char *anewExt,
int aoldFlag, afs_int32 aparent, afs_int32 alevel,
- int (*aproc) (int), afs_int32 *ports, afs_int32 portCount,
+ int (*aproc) (int), afs_int32 *ports, afs_int32 portCount,
struct bc_dumpSchedule *dsptr, int append, int dontExecute)
{
int i;
*/
int
-bc_LabelTape(char *afsname, char *pname, afs_int32 size,
+bc_LabelTape(char *afsname, char *pname, afs_int32 size,
struct bc_config *config, afs_int32 port)
{
struct rx_connection *tconn;
/* get a connection to the tape controller */
afs_int32
-bc_GetConn(struct bc_config *aconfig, afs_int32 aport,
+bc_GetConn(struct bc_config *aconfig, afs_int32 aport,
struct rx_connection **tconn)
{
afs_uint32 host;
/* CheckTCVersion
* make sure we are talking to a compatible butc process.
- * exit:
+ * exit:
* 0 - ok
* -1 - not compatible
*/
}
int
-ConnectButc(struct bc_config *config, afs_int32 port,
+ConnectButc(struct bc_config *config, afs_int32 port,
struct rx_connection **tconn)
{
afs_int32 code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "bucoord_internal.h"
#include "bucoord_prototypes.h"
-/* code to manage dump schedules
+/* code to manage dump schedules
* specific to the ubik database implementation
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* AddKtimeToNow
- * Returns current time with a relative time added. Note that the
+ * Returns current time with a relative time added. Note that the
* computation adds in most significant fields first, i.e. year, month
* day etc. Addition of least significant fields would produce different
* results (depending on the data).
*/
afs_int32
-bc_ParseExpiration(struct cmd_parmdesc *paramPtr, afs_int32 *expType,
+bc_ParseExpiration(struct cmd_parmdesc *paramPtr, afs_int32 *expType,
afs_int32 *expDate)
{
struct cmd_item *itemPtr, *tempPtr;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
initialize_KTC_error_table();
}
-/*
- * got to account for the errors which are volume related but
+/*
+ * got to account for the errors which are volume related but
* not dealt with by standard errno and com_err stuff.
*/
void
extern char *loadFile; /* declared in commands.c */
char lineBuffer[1024]; /* Line typed in by user or read from load file */
-/*
+/*
* This will dispatch a command. It holds a recursive loop for the
* "dump -file" option. This option reads backup commands from a file.
*
* Cannot put this code on other side of cmd_Dispatch call (in
* commands.c) because when make a dispatch call when in a dispatch
* call, environment is mucked up.
- *
+ *
* To avoid multiple processes stepping on each other in the dispatch code,
* put a lock around it so only 1 process gets in at a time.
*/
afs_int32
doDispatch(afs_int32 targc,
- char *targv[MAXV],
+ char *targv[MAXV],
afs_int32 dispatchCount) /* to prevent infinite recursion */
{
char *sargv[MAXV];
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define HOSTADDR(sockaddr) (sockaddr)->sin_addr.s_addr
/* local structure to keep track of volumes and the dumps from which
- * they should be restored
+ * they should be restored
*/
struct dumpinfo {
struct dumpinfo *next;
ERROR(BC_NOMEM);
}
- /* For each volume to restore, find which dump it's most recent full or
+ /* For each volume to restore, find which dump it's most recent full or
* incremental is on and thread onto our dump list (from oldest to newest
* dump). Also hang the volume off of the dump (no particular order).
*/
di->lastinlist = vi;
} /*tvol */
- /* For each of the above dumps we found (they could be increments), find
- * the dump's lineage (up to the full dump).
+ /* For each of the above dumps we found (they could be increments), find
+ * the dump's lineage (up to the full dump).
*/
for (di = dumpinfolist; di; di = di->next) {
/* Find each of the parent dumps */
/* For each of the volumes that has a dump in this lineage (vi),
* find where it is in each dump level (lv) starting at level 0 and
* going to higest. Each dump level could contain one or more
- * fragments (vecount) of the volume (volume fragments span tapes).
- * Each volume fragment is sorted by tapeid, tape sequence, and tape
+ * fragments (vecount) of the volume (volume fragments span tapes).
+ * Each volume fragment is sorted by tapeid, tape sequence, and tape
* position.
*/
for (vi = di->volinfolist; vi; vi = vi->next) {
(tle->initialDumpID ? tle->
initialDumpID : tle->dumpID);
- /* Sort by tapeids. BUT, we don't want add an entry in the middle
- * of a dumpset (might split a volume fragmented across tapes).
- * So make sure we step to next dumpset. tlid is the tapeid of
+ /* Sort by tapeids. BUT, we don't want add an entry in the middle
+ * of a dumpset (might split a volume fragmented across tapes).
+ * So make sure we step to next dumpset. tlid is the tapeid of
* the last tape we added a volume to. This can happen when an
* incremental was appended to a tape created prior its parent-
* dump's tape, and needs to be restored after it.
} /* Allocate and insert a tape entry */
}
- /* Found the tapeid (the dumpset). Check if its the correct
+ /* Found the tapeid (the dumpset). Check if its the correct
* tape sequence
*/
else if (tapeid == tid) {
foundtape = 1; /* Found dumpset but not the tape */
}
- /* Prevously found the tapeid (the dumpset) but this tape
- * sequence not included (the tapeid has changed). So add
+ /* Prevously found the tapeid (the dumpset) but this tape
+ * sequence not included (the tapeid has changed). So add
* this tape entry to the end of its dumpset.
*/
else if (foundtape) {
(tle->initialDumpID ? tle->initialDumpID : tle->
dumpID);
- /* Now place the volume fragment into the correct position on
+ /* Now place the volume fragment into the correct position on
* this tapelist entry. Duplicate entries are ignored.
*/
for (pti = 0, ti = tle->restoreList; ti;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <errno.h>
#include "bucoord_internal.h"
#include "bucoord_prototypes.h"
-
+
/* code to manage tape hosts
* specific to the ubik database implementation
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return 0;
}
-/* this call waits for a dump to complete; it ties up an LWP on the tape
+/* this call waits for a dump to complete; it ties up an LWP on the tape
coordinator */
STC_WaitForDump()
{
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern char *whoami;
/* -------------------------------------
- * Globals
+ * Globals
* -------------------------------------
*/
return (code);
}
-afs_int32 bcdb_deleteDump(afs_int32 dumpID, afs_int32 fromTime, afs_int32 toTime,
+afs_int32 bcdb_deleteDump(afs_int32 dumpID, afs_int32 fromTime, afs_int32 toTime,
budb_dumpsList *dumps)
{
afs_int32 code;
*/
int
-bcdb_FindDump(char *volumeName, afs_int32 beforeDate,
+bcdb_FindDump(char *volumeName, afs_int32 beforeDate,
struct budb_dumpEntry *deptr)
{
afs_int32 code;
*/
afs_int32
-bcdb_FindLastVolClone(char *volSetName, char *dumpName, char *volName,
+bcdb_FindLastVolClone(char *volSetName, char *dumpName, char *volName,
afs_int32 *clonetime)
{
/* server notes
*/
int
-bcdb_FindLatestDump(char *volSetName, char *dumpPath,
+bcdb_FindLatestDump(char *volSetName, char *dumpPath,
struct budb_dumpEntry *deptr)
{
afs_int32 code;
*/
int
-bcdb_FindTape(afs_int32 dumpid, char *tapeName,
+bcdb_FindTape(afs_int32 dumpid, char *tapeName,
struct budb_tapeEntry *teptr)
{
budb_tapeList tl;
}
int
-bcdb_FindTapeSeq(afs_int32 dumpid, afs_int32 tapeSeq,
+bcdb_FindTapeSeq(afs_int32 dumpid, afs_int32 tapeSeq,
struct budb_tapeEntry *teptr)
{
budb_tapeList tl;
}
/* bcdb_FindVolumes
- * notes:
+ * notes:
* - this is part of dblookup. The existing semantics will not work since
* they do lookups based on dump id.
* - in the restore code, it uses this to extract information about
*/
afs_int32
-bcdb_FindVolumes(afs_int32 dumpID, char *volumeName,
- struct budb_volumeEntry *returnArray,
- afs_int32 last, afs_int32 *next, afs_int32 maxa,
+bcdb_FindVolumes(afs_int32 dumpID, char *volumeName,
+ struct budb_volumeEntry *returnArray,
+ afs_int32 last, afs_int32 *next, afs_int32 maxa,
afs_int32 *nEntries)
{
budb_volumeList vl;
*/
afs_int32
-bcdb_LookupVolume(char *volumeName, struct budb_volumeEntry *returnArray,
- afs_int32 last, afs_int32 *next, afs_int32 maxa,
+bcdb_LookupVolume(char *volumeName, struct budb_volumeEntry *returnArray,
+ afs_int32 last, afs_int32 *next, afs_int32 maxa,
afs_int32 *nEntries)
{
budb_volumeList vl;
/* ---- text configuration handling routines ----
- *
- * notes:
+ *
+ * notes:
* The caller should pass in/out a fid for an unlinked, open file to prevent
- * tampering with the files contents;
+ * tampering with the files contents;
*/
/* bcdb_GetTextFile
return secFlags;
}
-/* vldbClientInit
+/* vldbClientInit
* Initialize a client for the vl ubik database.
*/
int
-vldbClientInit(int noAuthFlag, int localauth, char *cellName,
- struct ubik_client **cstruct,
+vldbClientInit(int noAuthFlag, int localauth, char *cellName,
+ struct ubik_client **cstruct,
time_t *expires)
{
afs_int32 code = 0;
*/
afs_int32
-ubik_Call_SingleServer(int (*aproc) (), struct ubik_client *aclient,
- afs_int32 aflags, char *p1, char *p2, char *p3,
+ubik_Call_SingleServer(int (*aproc) (), struct ubik_client *aclient,
+ afs_int32 aflags, char *p1, char *p2, char *p3,
char *p4, char *p5, char *p6, char *p7, char *p8,
- char *p9, char *p10, char *p11, char *p12, char *p13,
+ char *p9, char *p10, char *p11, char *p12, char *p13,
char *p14, char *p15, char *p16)
{
afs_int32 code;
/* -------------------------------------
- * debug and test routines
+ * debug and test routines
* -------------------------------------
*/
* the udbClientTextP.textStream member.
* Output: The temp file name is returned in tmpFileName. This should be used
* to delete the file when done with it.
- * Return Values:
+ * Return Values:
* !0: error code
* 0: Success.
*/
/* bc_closeTextFile: This function closes any actual temp files associated with
- * a udbClientText structure.
+ * a udbClientText structure.
* Input: ctPtr->textStream - stream to close
* tmpFileName - temp file name to delete
- * RetVal:
+ * RetVal:
* 0 - Success
* !0 - error code
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "error_macros.h"
#include "bucoord_internal.h"
#include "bucoord_prototypes.h"
-
+
/* code to manage volumesets
* specific to the ubik database implementation
*/
tvs->next = (struct bc_volumeSet *)0;
} /*r */
else { /*e */
- /* Scan a volume name entry, which contains the server name,
+ /* Scan a volume name entry, which contains the server name,
* partition pattern, and volume pattern.
*/
code = sscanf(tbuffer, "%s %s %s", serverName, partName, vsname);
continue;
}
- /* The line just read in is a volume spec. Create a new volume
- * spec record, then get the rest of the information regarding
+ /* The line just read in is a volume spec. Create a new volume
+ * spec record, then get the rest of the information regarding
* the host, and stuff everything into place.
*/
tve = (struct bc_volumeEntry *)
}
} /*forever loop */
- /* If we hit an EOF in the middle of a volume set record, we bitch and
+ /* If we hit an EOF in the middle of a volume set record, we bitch and
* moan.
*/
if (!readHeader)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* ********************************************************************* */
afs_int32
-bc_GetEntryByID(struct ubik_client *uclient, afs_int32 volID,
+bc_GetEntryByID(struct ubik_client *uclient, afs_int32 volID,
afs_int32 volType, struct vldbentry *vldbEntryPtr)
{
afs_int32 code = 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* package up seek and write into one procedure for ease of use */
-/* dbwrite
+/* dbwrite
* write a portion of the database
* entry:
* pos - offset into the database (disk address). If this is in the
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct memoryHashTable *ht_GetType(int type, int *e_sizeP);
extern afs_uint32 ht_HashEntry(struct memoryHashTable *mht, char *e);
-extern dbadr ht_LookupBucket(struct ubik_trans *ut,
+extern dbadr ht_LookupBucket(struct ubik_trans *ut,
struct memoryHashTable *mht,
afs_uint32 hash, int old);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
afs_int32
-AllocBlock(struct ubik_trans *ut,
+AllocBlock(struct ubik_trans *ut,
struct block *block, /* copy of data */
dbadr *aP) /* db addr of block */
{
db_panic("nFree is zero");
/* Completely empty blocks go to generic free list if there are
- * more blocks on this free list
+ * more blocks on this free list
*/
if (b.h.next && (nFree == nEntries[(int) type]) && (count-- > 0)) {
if (set_header_word(ut, freePtrs[(int) type], b.h.next)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* ht_Reset
- * reinitialize a memory hash table.
+ * reinitialize a memory hash table.
* Calls ht_ResetT to invalidate the two block arrays.
*/
}
afs_int32
-ht_GetTableBlock(struct ubik_trans *ut, struct memoryHashTable *mht,
- afs_uint32 hash, int old, struct memoryHTBlock **blockP,
+ht_GetTableBlock(struct ubik_trans *ut, struct memoryHashTable *mht,
+ afs_uint32 hash, int old, struct memoryHTBlock **blockP,
int *boP)
{
struct hashTable *ht = NULL;
}
dbadr
-ht_LookupBucket(struct ubik_trans *ut, struct memoryHashTable *mht,
+ht_LookupBucket(struct ubik_trans *ut, struct memoryHashTable *mht,
afs_uint32 hash, int old)
{
struct memoryHTBlock *block;
}
afs_uint32
-ht_HashEntry(struct memoryHashTable *mht,
+ht_HashEntry(struct memoryHashTable *mht,
char *e) /* entry's address (in b) */
{
int type = ntohl(mht->ht->functionType);
*/
afs_int32
-ht_LookupEntry(struct ubik_trans *ut,
- struct memoryHashTable *mht,
+ht_LookupEntry(struct ubik_trans *ut,
+ struct memoryHashTable *mht,
void *key, /* pointer to lookup key to match */
dbadr *eaP, /* db addr of entry found or zero */
void *e) /* contents of located entry */
*/
static afs_int32
-ht_HashInList(struct ubik_trans *ut, struct memoryHashTable *mht,
+ht_HashInList(struct ubik_trans *ut, struct memoryHashTable *mht,
int *opQuota, struct memoryHTBlock *block, int blockOffset)
{
struct hashTable *ht = mht->ht;
afs_int32
ht_HashOut(struct ubik_trans *ut, struct memoryHashTable *mht, dbadr ea,
- void *e)
+ void *e)
{
afs_uint32 hash;
afs_int32 code;
afs_int32
scanHashTable(struct ubik_trans *ut, struct memoryHashTable *mhtPtr,
- int (*selectFn) (dbadr, void *, void *),
- int (*operationFn) (dbadr, void *, void *),
+ int (*selectFn) (dbadr, void *, void *),
+ int (*operationFn) (dbadr, void *, void *),
void *rockPtr)
{
struct htBlock hashTableBlock;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 FreeAllLocks(struct rx_call *, afs_uint32);
afs_int32 FreeLock(struct rx_call *, afs_uint32);
afs_int32 GetInstanceId(struct rx_call *, afs_uint32 *);
-afs_int32 GetLock(struct rx_call *, afs_uint32, afs_int32, afs_int32,
+afs_int32 GetLock(struct rx_call *, afs_uint32, afs_int32, afs_int32,
afs_uint32 *);
afs_int32
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/* BUDB_GetText
- * notes:
+ * notes:
* routine mallocs storage for charListPtr, freed by stub
*/
-afs_int32 GetText(struct rx_call *, afs_uint32, afs_int32, afs_int32,
+afs_int32 GetText(struct rx_call *, afs_uint32, afs_int32, afs_int32,
afs_int32, afs_int32 *, charListT *);
afs_int32 GetTextVersion(struct rx_call *, afs_int32, afs_uint32 *);
afs_int32 SaveText(struct rx_call *, afs_uint32, afs_int32, afs_int32,
}
afs_int32
-GetText(struct rx_call *call, afs_uint32 lockHandle, afs_int32 textType,
+GetText(struct rx_call *call, afs_uint32 lockHandle, afs_int32 textType,
afs_int32 maxLength, afs_int32 offset, afs_int32 *nextOffset,
charListT *charListPtr)
{
*/
afs_int32
-SBUDB_GetTextVersion(struct rx_call *call, afs_int32 textType,
+SBUDB_GetTextVersion(struct rx_call *call, afs_int32 textType,
afs_uint32 *tversion)
{
afs_int32 code;
}
afs_int32
-GetTextVersion(struct rx_call *call, afs_int32 textType,
+GetTextVersion(struct rx_call *call, afs_int32 textType,
afs_uint32 *tversion)
{
afs_int32 code;
*/
afs_int32
-SBUDB_SaveText(struct rx_call *call, afs_uint32 lockHandle,
+SBUDB_SaveText(struct rx_call *call, afs_uint32 lockHandle,
afs_int32 textType, afs_int32 offset, afs_int32 flags,
charListT *charListPtr)
{
}
afs_int32
-SaveText(struct rx_call *call, afs_uint32 lockHandle, afs_int32 textType,
+SaveText(struct rx_call *call, afs_uint32 lockHandle, afs_int32 textType,
afs_int32 offset, afs_int32 flags, charListT *charListPtr)
{
struct ubik_trans *ut;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32
-SBUDB_DumpDB(struct rx_call *call, int firstcall, afs_int32 maxLength,
+SBUDB_DumpDB(struct rx_call *call, int firstcall, afs_int32 maxLength,
charListT *charListPtr, afs_int32 *done)
{
afs_int32 code;
ObtainWriteLock(&dumpSyncPtr->ds_lock);
/* If asking for zero bytes, then this is a call to reset the timeToLive
- * timer. Reset it if there is a dump in progress.
+ * timer. Reset it if there is a dump in progress.
*/
if (maxLength == 0) {
charListPtr->charListT_val = NULL;
}
/* dumpWatcher
- * monitors the state of a database dump. If the dump calls do not
+ * monitors the state of a database dump. If the dump calls do not
* reset the time to live value, the dump times out. In that case,
- * we kill the database traversal thread and clean up all the other
+ * we kill the database traversal thread and clean up all the other
* state. Most importantly, the database is unlocked so that other
* transactions can proceed.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* notes
* 1) volInfo structures refering to a volume of the same name are
* chained together, i.e. the volumes described differ in volid, partition
- * etc. The structure at the head of this list (the sameNameChain) is
- * treated specially. When a delete volInfo request is processed, heads
+ * etc. The structure at the head of this list (the sameNameChain) is
+ * treated specially. When a delete volInfo request is processed, heads
* are not deleted unless all other items on the sameNameChain are gone.
*
* The result is that volInfo (head) structures may be present
* is only for the off-line case.
*/
-/* flags associated with each structure. These are set and checked in
+/* flags associated with each structure. These are set and checked in
* the blockMap entries
*/
extern int sizeFunctions[];
extern int nHTBuckets;
-afs_int32 DbVerify(struct rx_call *call, afs_int32 *status,
+afs_int32 DbVerify(struct rx_call *call, afs_int32 *status,
afs_int32 *orphans, afs_int32 *host);
afs_int32 verifyTextChain(struct ubik_trans *ut, struct textBlock *tbPtr);
-
+
#define DBBAD BUDB_DATABASEINCONSISTENT
*/
afs_int32
-checkDiskAddress(unsigned long address, int type, int *blockIndexPtr,
+checkDiskAddress(unsigned long address, int type, int *blockIndexPtr,
int *entryIndexPtr)
{
int index, offset;
*/
/* verifyDumpEntry
- * Follow the tapes entries hanging off of a dump and verify they belong
+ * Follow the tapes entries hanging off of a dump and verify they belong
* to the dump.
*/
afs_int32
void *param)
{
struct dump *dumpPtr = (struct dump *)param;
-
+
struct tape tape;
afs_int32 tapeAddr, tapeCount = 0, volCount = 0, appDumpCount = 0;
afs_int32 appDumpAddr, appDumpIndex, appDumpOffset;
/*
* verifyTapeEntry
- * Follw the volume fragments hanging off of a tape entry and verify
+ * Follw the volume fragments hanging off of a tape entry and verify
* they belong to the tape.
*/
afs_int32
* also verify all entries are also on the chain.
*/
afs_int32
-verifyVolInfoEntry(struct ubik_trans *ut, afs_int32 volInfoAddr, int ai,
+verifyVolInfoEntry(struct ubik_trans *ut, afs_int32 volInfoAddr, int ai,
int ao, void *param)
{
struct volInfo *volInfo = (struct volInfo *) param;
-
+
int volCount = 0, ccheck = 1;
afs_int32 volFragAddr;
int blockIndex, entryIndex;
if (volCount > misc->maxVolsPerVolInfo)
misc->maxVolsPerVolInfo = volCount;
- /* Check that all volInfo structures with same name point to the same
+ /* Check that all volInfo structures with same name point to the same
* head. If sameNameHead == 0, this is the head structure so we check,
* otherwise ignore
*/
*/
/* verifyBlocks
- * Read each block header of every 2K block and remember it in our global
+ * Read each block header of every 2K block and remember it in our global
* blockMap array. Also check that the type of block is good.
*/
afs_int32
/* verifyHashTableBlock
* Take a 2K hash table block and traverse its entries. Make sure each entry
- * is of the correct type for the hash table, is hashed into the correct
+ * is of the correct type for the hash table, is hashed into the correct
* entry and is not threaded on multiple lists.
*/
afs_int32
}
/* verifyHashTable
- * Read each 2K block a hashtable has (both its old hastable and
+ * Read each 2K block a hashtable has (both its old hastable and
* new hashtable) and verify the block has not been read before.
* Will also make call to verify entries within each 2K block of
* the hash table.
*/
afs_int32
-verifyHashTable(struct ubik_trans *ut, struct memoryHashTable *mhtPtr,
+verifyHashTable(struct ubik_trans *ut, struct memoryHashTable *mhtPtr,
int mapBit)
{
struct hashTable *htPtr = mhtPtr->ht;
int type;
int nFree;
- static afs_int32(*checkEntry[NBLOCKTYPES]) (struct ubik_trans *,
+ static afs_int32(*checkEntry[NBLOCKTYPES]) (struct ubik_trans *,
afs_int32, int, int, void *)
= {
/* FIXME: this list does not match typeName[] and may be incorrect */
}
afs_int32
-DbVerify(struct rx_call *call, afs_int32 *status, afs_int32 *orphans,
+DbVerify(struct rx_call *call, afs_int32 *status, afs_int32 *orphans,
afs_int32 *host)
{
struct ubik_trans *ut = 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 CreateDump(struct rx_call *, struct budb_dumpEntry *);
afs_int32 DoDeleteDump(struct rx_call *, dumpId, Date, Date, budb_dumpsList *);
afs_int32 DoDeleteTape(struct rx_call *, struct budb_tapeEntry *);
-afs_int32 ListDumps(struct rx_call *, afs_int32, afs_int32, Date, Date,
+afs_int32 ListDumps(struct rx_call *, afs_int32, afs_int32, Date, Date,
budb_dumpsList *, budb_dumpsList *);
afs_int32 DeleteVDP(struct rx_call *, char *, char *, afs_int32);
afs_int32 FindClone(struct rx_call *, afs_int32, char *, afs_int32 *);
-afs_int32 FindDump(struct rx_call *, char *, afs_int32,
+afs_int32 FindDump(struct rx_call *, char *, afs_int32,
struct budb_dumpEntry *);
-afs_int32 FindLatestDump(struct rx_call *, char *, char *,
+afs_int32 FindLatestDump(struct rx_call *, char *, char *,
struct budb_dumpEntry *);
afs_int32 FinishDump(struct rx_call *, struct budb_dumpEntry *);
afs_int32 FinishTape(struct rx_call *, struct budb_tapeEntry *);
-afs_int32 GetDumps(struct rx_call *, afs_int32, afs_int32, char *,
+afs_int32 GetDumps(struct rx_call *, afs_int32, afs_int32, char *,
afs_int32, afs_int32, afs_int32, afs_int32 *,
afs_int32 *, budb_dumpList *);
afs_int32 getExpiration(struct ubik_trans *ut, struct tape *);
-afs_int32 makeAppended(struct ubik_trans *ut, afs_int32, afs_int32,
+afs_int32 makeAppended(struct ubik_trans *ut, afs_int32, afs_int32,
afs_int32);
afs_int32 MakeDumpAppended(struct rx_call *, afs_int32, afs_int32,
afs_int32);
static int (*rebuildDatabase) (struct ubik_trans *);
-/* AwaitInitialization
+/* AwaitInitialization
* Wait unitl budb has initialized (InitProcs). If it hasn't
* within 5 seconds, then return no quorum.
*/
return 0;
}
- /* Up to 5 plus a maximum so SendReturnList() knows if we
+ /* Up to 5 plus a maximum so SendReturnList() knows if we
* need to come back for more.
*/
if (list->nElements >= BUDB_MAX_RETURN_LIST + 5)
static afs_int32
SendReturnList(struct ubik_trans *ut,
struct returnList *list, /* list of elements to return */
- afs_int32(*FillProc) (struct ubik_trans *, dbadr da,
+ afs_int32(*FillProc) (struct ubik_trans *, dbadr da,
void *),
/* proc to fill entry */
int e_size, /* size of each element */
}
/* deletesomevolumesfromtape
- * Deletes a specified number of volumes from a tape. The tape
+ * Deletes a specified number of volumes from a tape. The tape
* and dump are modified to reflect the smaller number of volumes.
* The transaction is not terminated, it is up to the caller to
* finish the transaction and start a new one (if desired).
}
afs_int32
-SBUDB_ListDumps(struct rx_call *call, afs_int32 sflags, char *name,
- afs_int32 groupid, Date fromTime, Date toTime,
+SBUDB_ListDumps(struct rx_call *call, afs_int32 sflags, char *name,
+ afs_int32 groupid, Date fromTime, Date toTime,
budb_dumpsList *dumps, budb_dumpsList *flags)
{
afs_int32 code;
}
afs_int32
-ListDumps(struct rx_call *call, afs_int32 sflags, afs_int32 groupid,
- Date fromTime, Date toTime, budb_dumpsList *dumps,
+ListDumps(struct rx_call *call, afs_int32 sflags, afs_int32 groupid,
+ Date fromTime, Date toTime, budb_dumpsList *dumps,
budb_dumpsList *flags)
{
struct ubik_trans *ut;
/* BUDB_FindClone
* notes:
- * Given a volume name, and a dumpID, find the volume in that dump and
- * return the clone date of the volume (this is the clone date of the
+ * Given a volume name, and a dumpID, find the volume in that dump and
+ * return the clone date of the volume (this is the clone date of the
* volume at the time it was dumped).
- *
- * Hashes on the volume name and traverses the fragments. Will need to read
+ *
+ * Hashes on the volume name and traverses the fragments. Will need to read
* the volumes tape entry to determine if it belongs to the dump. If the
* volume is not found in the dump, then look for it in its parent dump.
*/
* flags - for search and select operations. Broken down into flags
* for name, start point, end point and time.
* name - name to search for. Interpretation based on flags
- * end
+ * end
* index
* nextIndexP
* dbTimeP
* exit:
- * nextIndexP
+ * nextIndexP
* dbTimeP - time at which the database was last modified. Up to
* caller (client) to take appropriate action if database
* modified between successive calls
return code;
}
-/*
+/*
* Get the expiration of a tape. Since the dump could have appended dumps,
- * we should use the most recent expiration date. Put the most recent
+ * we should use the most recent expiration date. Put the most recent
* expiration tape into the given tape structure.
*/
afs_int32
/* Mark the following dump as appended to another, intial dump */
afs_int32
-makeAppended(struct ubik_trans *ut, afs_int32 appendedDumpID,
+makeAppended(struct ubik_trans *ut, afs_int32 appendedDumpID,
afs_int32 initialDumpID, afs_int32 startTapeSeq)
{
dbadr ada, da, lastDumpAddr;
/* Update the appended dump's tape format with that of the initial */
strcpy(ad.tapes.format, d.tapes.format);
- /* starting with the initial dump step through its appended dumps till
- * we reach the last appended dump.
+ /* starting with the initial dump step through its appended dumps till
+ * we reach the last appended dump.
*/
lastDumpAddr = da;
while (d.appendedDumpChain) {
}
afs_int32
-SBUDB_MakeDumpAppended(struct rx_call *call, afs_int32 appendedDumpID,
+SBUDB_MakeDumpAppended(struct rx_call *call, afs_int32 appendedDumpID,
afs_int32 initialDumpID, afs_int32 startTapeSeq)
{
afs_int32 code;
}
afs_int32
-MakeDumpAppended(struct rx_call *call, afs_int32 appendedDumpID,
+MakeDumpAppended(struct rx_call *call, afs_int32 appendedDumpID,
afs_int32 initialDumpID, afs_int32 startTapeSeq)
{
struct ubik_trans *ut;
/* Find the last tape of a dump-set. This includes any appended dumps */
afs_int32
-SBUDB_FindLastTape(struct rx_call *call, afs_int32 dumpID,
- struct budb_dumpEntry *dumpEntry,
- struct budb_tapeEntry *tapeEntry,
+SBUDB_FindLastTape(struct rx_call *call, afs_int32 dumpID,
+ struct budb_dumpEntry *dumpEntry,
+ struct budb_tapeEntry *tapeEntry,
struct budb_volumeEntry *volEntry)
{
afs_int32 code;
}
afs_int32
-FindLastTape(struct rx_call *call, afs_int32 dumpID,
- struct budb_dumpEntry *dumpEntry,
- struct budb_tapeEntry *tapeEntry,
+FindLastTape(struct rx_call *call, afs_int32 dumpID,
+ struct budb_dumpEntry *dumpEntry,
+ struct budb_tapeEntry *tapeEntry,
struct budb_volumeEntry *volEntry)
{
struct ubik_trans *ut;
*/
void
-volFragmentDiskToHost(struct volFragment *diskVfPtr,
+volFragmentDiskToHost(struct volFragment *diskVfPtr,
struct volFragment *hostVfPtr)
{
hostVfPtr->vol = ntohl(diskVfPtr->vol);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
globalConfPtr->log = fopen(DEFAULT_LOGNAME,"a");
if ( globalConfPtr->log == NULL )
- {
+ {
printf("Can't open log file %s - aborting\n", DEFAULT_LOGNAME);
BUDB_EXIT(-1);
}
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
}
code = ubik_ServerInitByInfo (globalConfPtr->myHost,
- htons(AFSCONF_BUDBPORT),
+ htons(AFSCONF_BUDBPORT),
&cellinfo,
- clones,
+ clones,
dbNamePtr, /* name prefix */
&BU_dbase);
va_list ap;
va_start(ap, fmt);
-
+
if (debugging >= level) {
/* log normally closed so can remove it */
globalConfPtr->log = fopen(AFSDIR_SERVER_BUDBLOG_FILEPATH, "a");
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
-void
+void
printDumpEntry(struct budb_dumpEntry *deptr)
{
time_t created = deptr->created;
/* -----------------------------------------
* structure xdr routines
- * -----------------------------------------
+ * -----------------------------------------
*/
/* utilities - network to host conversion
*/
void
-volFragment_ntoh(struct volFragment *netVfPtr,
+volFragment_ntoh(struct volFragment *netVfPtr,
struct volFragment *hostVfPtr)
{
hostVfPtr->vol = ntohl(netVfPtr->vol);
}
void
-volInfo_ntoh(struct volInfo *netViPtr,
+volInfo_ntoh(struct volInfo *netViPtr,
struct volInfo *hostViPtr)
{
strcpy(hostViPtr->name, netViPtr->name);
}
void
-tape_ntoh(struct tape *netTapePtr,
+tape_ntoh(struct tape *netTapePtr,
struct tape *hostTapePtr)
{
strcpy(hostTapePtr->name, netTapePtr->name);
}
void
-dump_ntoh(struct dump *netDumpPtr,
+dump_ntoh(struct dump *netDumpPtr,
struct dump *hostDumpPtr)
{
hostDumpPtr->id = ntohl(netDumpPtr->id);
hostDumpPtr->idHashChain = ntohl(netDumpPtr->idHashChain);
- strlcpy(hostDumpPtr->dumpName, netDumpPtr->dumpName,
+ strlcpy(hostDumpPtr->dumpName, netDumpPtr->dumpName,
sizeof(hostDumpPtr->dumpName));
strlcpy(hostDumpPtr->dumpPath, netDumpPtr->dumpPath,
sizeof(hostDumpPtr->dumpPath));
}
void
-DbHeader_ntoh(struct DbHeader *netptr,
+DbHeader_ntoh(struct DbHeader *netptr,
struct DbHeader *hostptr)
{
hostptr->dbversion = ntohl(netptr->dbversion);
}
void
-dumpEntry_ntoh(struct budb_dumpEntry *netptr,
+dumpEntry_ntoh(struct budb_dumpEntry *netptr,
struct budb_dumpEntry *hostptr)
{
hostptr->id = ntohl(netptr->id);
}
void
-principal_hton(struct budb_principal *hostptr,
+principal_hton(struct budb_principal *hostptr,
struct budb_principal *netptr)
{
strcpy(netptr->name, hostptr->name);
}
void
-principal_ntoh(struct budb_principal *netptr,
+principal_ntoh(struct budb_principal *netptr,
struct budb_principal *hostptr)
{
strcpy(hostptr->name, netptr->name);
}
void
-structDumpHeader_hton(struct structDumpHeader *hostPtr,
+structDumpHeader_hton(struct structDumpHeader *hostPtr,
struct structDumpHeader *netPtr)
{
netPtr->type = htonl(hostPtr->type);
}
void
-structDumpHeader_ntoh(struct structDumpHeader *netPtr,
+structDumpHeader_ntoh(struct structDumpHeader *netPtr,
struct structDumpHeader *hostPtr)
{
hostPtr->type = ntohl(netPtr->type);
}
void
-tapeEntry_ntoh(struct budb_tapeEntry *netptr,
+tapeEntry_ntoh(struct budb_tapeEntry *netptr,
struct budb_tapeEntry *hostptr)
{
strcpy(hostptr->name, netptr->name);
}
int
-tapeSet_hton(struct budb_tapeSet *hostptr,
+tapeSet_hton(struct budb_tapeSet *hostptr,
struct budb_tapeSet *netptr)
{
netptr->id = htonl(hostptr->id);
}
int
-tapeSet_ntoh(struct budb_tapeSet *netptr,
+tapeSet_ntoh(struct budb_tapeSet *netptr,
struct budb_tapeSet *hostptr)
{
hostptr->id = ntohl(netptr->id);
}
void
-textBlock_hton(struct textBlock *hostptr,
+textBlock_hton(struct textBlock *hostptr,
struct textBlock *netptr)
{
netptr->version = htonl(hostptr->version);
}
void
-textBlock_ntoh(struct textBlock *netptr,
+textBlock_ntoh(struct textBlock *netptr,
struct textBlock *hostptr)
{
hostptr->version = ntohl(netptr->version);
}
void
-volumeEntry_ntoh(struct budb_volumeEntry *netptr,
+volumeEntry_ntoh(struct budb_volumeEntry *netptr,
struct budb_volumeEntry *hostptr)
{
strcpy(hostptr->name, netptr->name);
}
/* -------------------------------------
- * structure conversion & copy routines
+ * structure conversion & copy routines
* -------------------------------------
*/
}
/* ----------------------------------
- * structure initialization routines
+ * structure initialization routines
* ---------------------------------
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
printf("dsm_MountLibrary : SUCCESS to Open the libApiDS shared library. \n");
#endif
#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX26_ENV)
- AFSdsmBeginQuery = (dsInt16_t (*)( dsUint32_t dsmHandle, dsmQueryType queryType, dsmQueryBuff *queryBuffer)) dlsym((void *)dynlib, "dsmBeginQuery");
+ AFSdsmBeginQuery = (dsInt16_t (*)( dsUint32_t dsmHandle, dsmQueryType queryType, dsmQueryBuff *queryBuffer)) dlsym((void *)dynlib, "dsmBeginQuery");
AFSdsmGetNextQObj = (dsInt16_t (*)( dsUint32_t dsmHandle, DataBlk *dataBlkPtr))dlsym((void *)dynlib, "dsmGetNextQObj") ;
AFSdsmEndQuery = (dsInt16_t (*)( dsUint32_t dsmHandle))dlsym((void *)dynlib, "dsmEndQuery");
AFSdsmRCMsg = (dsInt16_t (*)( dsUint32_t dsmHandle, dsInt16_t dsmRC, char *msg))dlsym((void *)dynlib, "dsmRCMsg");
if ( !AFSdsmBeginQuery || !AFSdsmGetNextQObj || !AFSdsmEndQuery ||
- !AFSdsmRCMsg || !AFSdsmLogEventEx || !AFSdsmTrace ||
- !AFSdsmTerminate || !AFSdsmEndGetObj || !AFSdsmSendData ||
+ !AFSdsmRCMsg || !AFSdsmLogEventEx || !AFSdsmTrace ||
+ !AFSdsmTerminate || !AFSdsmEndGetObj || !AFSdsmSendData ||
!AFSdsmBeginTxn || !AFSdsmDeleteObj || !AFSdsmEndGetData ||
- !AFSdsmEndTxn || !AFSdsmQueryApiVersion || !AFSdsmInit ||
+ !AFSdsmEndTxn || !AFSdsmQueryApiVersion || !AFSdsmInit ||
!AFSdsmGetData || !AFSdsmQuerySessInfo || !AFSdsmBeginGetData ||
- !AFSdsmGetObj || !AFSdsmEndSendObj || !AFSdsmRegisterFS ||
- !AFSdsmBindMC || !AFSdsmSendObj || !AFSdsmChangePW )
+ !AFSdsmGetObj || !AFSdsmEndSendObj || !AFSdsmRegisterFS ||
+ !AFSdsmBindMC || !AFSdsmSendObj || !AFSdsmChangePW )
{
ELog(0,"dsm_MountLibrary: The dlopen call to load the TSM shared library failed\n");
return(BUTX_NOLIBRARY);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-#ifndef _BSA_XBSA_H_
-#define _BSA_XBSA_H_
-
+#ifndef _BSA_XBSA_H_
+#define _BSA_XBSA_H_
+
#ifdef __cplusplus
extern "C" {
#endif
#include <dsmapitd.h>
#include <dsmapifp.h>
#include <dsmrc.h>
-
+
/* BSA_Boolean */
typedef char BSA_Boolean;
typedef short BSA_Int16;
/* BSA_Int32 */
-typedef long BSA_Int32;
+typedef long BSA_Int32;
/* BSA_Int64 */
typedef struct { /* defined as two 32-bit integers */
#define ADSM_RC_PSWD_TOO_LONG 0x67 /* pswd too long */
#define ADSM_RC_PSWD_GEN 0x68 /* pswd access = generate */
-/* Constants used
- *
- * Maximum string lengths (lower bound), including trailing null
- */
+/* Constants used
+ *
+ * Maximum string lengths (lower bound), including trailing null
+ */
#define BSA_LIST_ELEMENT_DELIMITER null /* Element delimiter in list */
#define BSA_MAX_ADMIN_NAME 64 /* Administrator name */
#define BSA_MAX_APPOBJECT_OWNER 64 /* Max end-object owner length */
#define BSA_MAX_RESOURCETYPE 31 /* Max resource mgr name length */
#define BSA_MAX_TOKEN_SIZE 64 /* Max size of a security token */
#define BSA_PUBLIC "BSA_ANY" /* Default string */
-
-/* Return Codes Used
- *
- * Return Code descriptions are given in Section 4.3.
- */
-#define BSA_RC_ABORT_ACTIVE_NOT_FOUND 0x02
-#define BSA_RC_ABORT_SYSTEM_ERROR 0x03
-#define BSA_RC_AUTHENTICATION_FAILURE 0x04
-#define BSA_RC_BAD_CALL_SEQUENCE 0x05
-#define BSA_RC_BAD_HANDLE 0x06
-#define BSA_RC_BUFFER_TOO_SMALL 0x07
-#define BSA_RC_DESC_TOO_LONG 0x08
-#define BSA_RC_OBJECTSPACE_TOO_LONG 0x09
-#define BSA_RC_INVALID_TOKEN 0x0a
-#define BSA_RC_INVALID_VOTE 0x0b
-#define BSA_RC_INVALID_KEYWORD 0x0c
-#define BSA_RC_MATCH_EXISTS 0x0d
-#define BSA_RC_MORE_DATA 0x0e
-#define BSA_RC_MORE_RULES 0x0f
-#define BSA_RC_NEWTOKEN_REQD 0x10
-#define BSA_RC_NO_MATCH 0x11
-#define BSA_RC_NO_MORE_DATA 0x12
-#define BSA_RC_NO_RESOURCES 0x13
-#define BSA_RC_NULL_DATABLKPTR 0x14
-#define BSA_RC_NULL_OBJNAME 0x15
-#define BSA_RC_NULL_POINTER 0x16
-#define BSA_RC_NULL_RULEID 0x17
-#define BSA_RC_OBJECT_NAME_TOO_LONG 0x18
-#define BSA_RC_OBJECT_NOT_EMPTY 0x19
-#define BSA_RC_OBJECT_NOT_FOUND 0x1a
-#define BSA_RC_OBJINFO_TOO_LONG 0x1b
-#define BSA_RC_OBJNAME_TOO_LONG 0x1c
-#define BSA_RC_OPERATION_NOT_AUTHORIZED 0x1d
-#define BSA_RC_OLDTOKEN_REQD 0x1e
-#define BSA_RC_TOKEN_EXPIRED 0x1f
-#define BSA_RC_TXN_ABORTED 0x20
-#define BSA_RC_UNMATCHED_QUOTE 0x21
-#define BSA_RC_USER_OWNS_OBJECTS 0x22
-
-/* AppObjectOwner
- */
-typedef char AppObjectOwner[BSA_MAX_APPOBJECT_OWNER];
-
-/* BSAObjectOwner
- */
-typedef char BSAObjectOwner[BSA_MAX_BSAOBJECT_OWNER];
-
-/* CopyGpDest
- */
-typedef char CopyGpDest[BSA_MAX_CG_DEST];
-
-/* CopyGpName
- */
-typedef char CopyGpName[BSA_MAX_CG_NAME];
-
-/* CopyMode
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * INCREMENTAL 1 Specifies that the Backup Services should make a
- * copy only if the application object has been
- * modified since the last time this copy group was
- * used to create the object's copy.
- * ABSOLUTE 2 Specifies that the Backup Services should make a
- * copy even if the application object has not been
- * modified since the last time this copy group was
- * used to create the object's copy.
- */
-typedef enum {
- BSACopyMode_INCREMENTAL = 1,
- BSACopyMode_ABSOLUTE = 2
-} CopyMode;
-
-/* CopySerialization
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * STATIC 1 Specifies that the Backup Services must create a
- * consistent (unmodified during the operation) copy of
- * the object. If the application is unable to create a
- * consistent copy then it should skip the operation
- * (creating backup or archive copy) for the object.
- * SHAREDSTATIC 2 Specifies that the Backup Services must create a
- * consistent copy of the object. It can retry the
- * operation a number of times (application dependent).
- * If the Backup Services is unable to create a
- * consistent copy even after retries, then it should
- * skip creating a backup or archive copy of the
- * object.
- * SHAREDDYNAMIC 3 Specifies that the Backup Services must create a
- * copy of the object. It can retry the operation a
- * number of times in an attempt to create a consistent
- * copy; however, if it fails to make a consistent
- * copy, a copy must still be made, ignoring the fact
- * that the copy may have been modified during the
- * operation. Such copies are useful for log file
- * objects which are being continuously modified.
- * DYNAMIC 4 Specifies that the Backup Services must create a
- * copy of the obbject even if the source object is
- * modified during the operation. No retries should be
- * attempted to create a consistent copy.
- */
-typedef enum {
- BSACopySerialization_STATIC = 1,
- BSACopySerialization_SHAREDSTATIC = 2,
- BSACopySerialization_SHAREDDYNAMIC = 3,
- BSACopySerialization_DYNAMIC = 4
-} CopySerialization;
-
-/* CopyType
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * ANY 1 Used for matching any copy type (e.g. "backup" or
- * "archive" in the copy type field of structures for
- * selecting query results).
- * ARCHIVE 2 Specifies that the copy type should be "archive".
- * When used in the copy type field of the CopyGroup,
- * it identifies the copy data as of type
- * ArchiveCopyData, which is used to create archive
- * copies.
- * BACKUP 3 Specifies that the copy type should be "backup".
- * When used in the copy type field of the CopyGroup,
- * it identifies the copy data as of type
- * BackupCopyData, which is used to create backup
- * copies.
- */
-typedef enum {
- BSACopyType_ANY = 1,
- BSACopyType_ARCHIVE = 2,
- BSACopyType_BACKUP = 3
-} CopyType;
-
-/* Description
- */
-typedef char Description[BSA_MAX_DESC];
-
-/* DomainName
- */
-typedef char * DomainName[BSA_MAX_POLICYDOMAIN_NAME];
-
-/* EventInfo
- */
-typedef char EventInfo[BSA_MAX_EVENTINFO];
-
-/* LGName
- */
-typedef char LGName[BSA_MAX_LG_NAME];
-
-/* ObjectInfo
- */
-typedef char ObjectInfo[BSA_MAX_OBJINFO];
-
-/* ObjectName
- */
-typedef struct {
- char objectSpaceName[BSA_MAX_OSNAME]; /* Highest-level name qualifier */
- char pathName[BSA_MAX_PATHNAME]; /* Object name within */
- /* objectspace */
-} ObjectName;
-
-/* ObjectOwner
- */
-typedef struct {
- BSAObjectOwner bsaObjectOwner; /* BSA Owner name - this is the name */
- /* that Backup Services authenticates */
- AppObjectOwner appObjectOwner; /* End-owner name, this is the name */
- /* defined by the application */
-} ObjectOwner;
-
-/* ObjectSize
- */
-typedef BSA_UInt64 ObjectSize; /* Unsigned 64-bit integer */
-
-/* ObjectStatus
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * ANY 1 Provides a wild card function. Can only be used in
- * queries.
- * ACTIVE 2 Indicates that this is the most recent backup copy
- * of an object.
- * INACTIVE 3 Indicates that this is not the most recent backup
- * copy, or that the object itself no longer exists.
- */
-typedef enum {
- BSAObjectStatus_ANY = 1,
- BSAObjectStatus_ACTIVE = 2,
- BSAObjectStatus_INACTIVE = 3
-} ObjectStatus;
-
-/* ObjectType
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * any 1 Used for matching any object type (e.g. "file" or
- * "directory") value in the object type field of
- * structures for selecting query results.
- * file 2 Used by the application to indicate that the type of
- * application object is a "file" or single object.
- * directory 3 Used by the application to indicate that the type of
- * application object is a "directory" or container of
- * objects.
- */
+
+/* Return Codes Used
+ *
+ * Return Code descriptions are given in Section 4.3.
+ */
+#define BSA_RC_ABORT_ACTIVE_NOT_FOUND 0x02
+#define BSA_RC_ABORT_SYSTEM_ERROR 0x03
+#define BSA_RC_AUTHENTICATION_FAILURE 0x04
+#define BSA_RC_BAD_CALL_SEQUENCE 0x05
+#define BSA_RC_BAD_HANDLE 0x06
+#define BSA_RC_BUFFER_TOO_SMALL 0x07
+#define BSA_RC_DESC_TOO_LONG 0x08
+#define BSA_RC_OBJECTSPACE_TOO_LONG 0x09
+#define BSA_RC_INVALID_TOKEN 0x0a
+#define BSA_RC_INVALID_VOTE 0x0b
+#define BSA_RC_INVALID_KEYWORD 0x0c
+#define BSA_RC_MATCH_EXISTS 0x0d
+#define BSA_RC_MORE_DATA 0x0e
+#define BSA_RC_MORE_RULES 0x0f
+#define BSA_RC_NEWTOKEN_REQD 0x10
+#define BSA_RC_NO_MATCH 0x11
+#define BSA_RC_NO_MORE_DATA 0x12
+#define BSA_RC_NO_RESOURCES 0x13
+#define BSA_RC_NULL_DATABLKPTR 0x14
+#define BSA_RC_NULL_OBJNAME 0x15
+#define BSA_RC_NULL_POINTER 0x16
+#define BSA_RC_NULL_RULEID 0x17
+#define BSA_RC_OBJECT_NAME_TOO_LONG 0x18
+#define BSA_RC_OBJECT_NOT_EMPTY 0x19
+#define BSA_RC_OBJECT_NOT_FOUND 0x1a
+#define BSA_RC_OBJINFO_TOO_LONG 0x1b
+#define BSA_RC_OBJNAME_TOO_LONG 0x1c
+#define BSA_RC_OPERATION_NOT_AUTHORIZED 0x1d
+#define BSA_RC_OLDTOKEN_REQD 0x1e
+#define BSA_RC_TOKEN_EXPIRED 0x1f
+#define BSA_RC_TXN_ABORTED 0x20
+#define BSA_RC_UNMATCHED_QUOTE 0x21
+#define BSA_RC_USER_OWNS_OBJECTS 0x22
+
+/* AppObjectOwner
+ */
+typedef char AppObjectOwner[BSA_MAX_APPOBJECT_OWNER];
+
+/* BSAObjectOwner
+ */
+typedef char BSAObjectOwner[BSA_MAX_BSAOBJECT_OWNER];
+
+/* CopyGpDest
+ */
+typedef char CopyGpDest[BSA_MAX_CG_DEST];
+
+/* CopyGpName
+ */
+typedef char CopyGpName[BSA_MAX_CG_NAME];
+
+/* CopyMode
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * INCREMENTAL 1 Specifies that the Backup Services should make a
+ * copy only if the application object has been
+ * modified since the last time this copy group was
+ * used to create the object's copy.
+ * ABSOLUTE 2 Specifies that the Backup Services should make a
+ * copy even if the application object has not been
+ * modified since the last time this copy group was
+ * used to create the object's copy.
+ */
+typedef enum {
+ BSACopyMode_INCREMENTAL = 1,
+ BSACopyMode_ABSOLUTE = 2
+} CopyMode;
+
+/* CopySerialization
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * STATIC 1 Specifies that the Backup Services must create a
+ * consistent (unmodified during the operation) copy of
+ * the object. If the application is unable to create a
+ * consistent copy then it should skip the operation
+ * (creating backup or archive copy) for the object.
+ * SHAREDSTATIC 2 Specifies that the Backup Services must create a
+ * consistent copy of the object. It can retry the
+ * operation a number of times (application dependent).
+ * If the Backup Services is unable to create a
+ * consistent copy even after retries, then it should
+ * skip creating a backup or archive copy of the
+ * object.
+ * SHAREDDYNAMIC 3 Specifies that the Backup Services must create a
+ * copy of the object. It can retry the operation a
+ * number of times in an attempt to create a consistent
+ * copy; however, if it fails to make a consistent
+ * copy, a copy must still be made, ignoring the fact
+ * that the copy may have been modified during the
+ * operation. Such copies are useful for log file
+ * objects which are being continuously modified.
+ * DYNAMIC 4 Specifies that the Backup Services must create a
+ * copy of the obbject even if the source object is
+ * modified during the operation. No retries should be
+ * attempted to create a consistent copy.
+ */
+typedef enum {
+ BSACopySerialization_STATIC = 1,
+ BSACopySerialization_SHAREDSTATIC = 2,
+ BSACopySerialization_SHAREDDYNAMIC = 3,
+ BSACopySerialization_DYNAMIC = 4
+} CopySerialization;
+
+/* CopyType
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * ANY 1 Used for matching any copy type (e.g. "backup" or
+ * "archive" in the copy type field of structures for
+ * selecting query results).
+ * ARCHIVE 2 Specifies that the copy type should be "archive".
+ * When used in the copy type field of the CopyGroup,
+ * it identifies the copy data as of type
+ * ArchiveCopyData, which is used to create archive
+ * copies.
+ * BACKUP 3 Specifies that the copy type should be "backup".
+ * When used in the copy type field of the CopyGroup,
+ * it identifies the copy data as of type
+ * BackupCopyData, which is used to create backup
+ * copies.
+ */
+typedef enum {
+ BSACopyType_ANY = 1,
+ BSACopyType_ARCHIVE = 2,
+ BSACopyType_BACKUP = 3
+} CopyType;
+
+/* Description
+ */
+typedef char Description[BSA_MAX_DESC];
+
+/* DomainName
+ */
+typedef char * DomainName[BSA_MAX_POLICYDOMAIN_NAME];
+
+/* EventInfo
+ */
+typedef char EventInfo[BSA_MAX_EVENTINFO];
+
+/* LGName
+ */
+typedef char LGName[BSA_MAX_LG_NAME];
+
+/* ObjectInfo
+ */
+typedef char ObjectInfo[BSA_MAX_OBJINFO];
+
+/* ObjectName
+ */
+typedef struct {
+ char objectSpaceName[BSA_MAX_OSNAME]; /* Highest-level name qualifier */
+ char pathName[BSA_MAX_PATHNAME]; /* Object name within */
+ /* objectspace */
+} ObjectName;
+
+/* ObjectOwner
+ */
+typedef struct {
+ BSAObjectOwner bsaObjectOwner; /* BSA Owner name - this is the name */
+ /* that Backup Services authenticates */
+ AppObjectOwner appObjectOwner; /* End-owner name, this is the name */
+ /* defined by the application */
+} ObjectOwner;
+
+/* ObjectSize
+ */
+typedef BSA_UInt64 ObjectSize; /* Unsigned 64-bit integer */
+
+/* ObjectStatus
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * ANY 1 Provides a wild card function. Can only be used in
+ * queries.
+ * ACTIVE 2 Indicates that this is the most recent backup copy
+ * of an object.
+ * INACTIVE 3 Indicates that this is not the most recent backup
+ * copy, or that the object itself no longer exists.
+ */
+typedef enum {
+ BSAObjectStatus_ANY = 1,
+ BSAObjectStatus_ACTIVE = 2,
+ BSAObjectStatus_INACTIVE = 3
+} ObjectStatus;
+
+/* ObjectType
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * any 1 Used for matching any object type (e.g. "file" or
+ * "directory") value in the object type field of
+ * structures for selecting query results.
+ * file 2 Used by the application to indicate that the type of
+ * application object is a "file" or single object.
+ * directory 3 Used by the application to indicate that the type of
+ * application object is a "directory" or container of
+ * objects.
+ */
typedef enum {
BSAObjectType_ANY = 1,
BSAObjectType_FILE = 2,
BSAObjectType_DIRECTORY = 3
} ObjectType;
-
-/* Operation
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * archive 1 Used to indicate that a scheduled operation is of
- * type "archive".
- * backup 2 Used to indicate that a scheduled operation is of
- * type "backup".
- */
-typedef enum {
- BSAOperation_ARCHIVE = 1,
- BSAOperation_BACKUP = 2
-} Operation;
-
-/* Period
- *
- * Use of the Period structure in a Schedule for an event:
- * 1. The Schedule structure specifies 3 timing elements:
- * a. "firstStartTime" - a timestamp showing the "earliest"
- * possible time the event could take place
- * b. "day" - the day of the week the event should occur
- * c. "frequency" - the period between successive events
- * 2. To determine the day the event should occur (this does
- * not change the time of the event in the day):
- * a. Determine the requested day from "firstStartTime".
- * b. If "day" does not equal XBSA_DAYOFWEEK_ANY
- * i. Compare "day" to the day of the week corresponding
- * to "firstStartTime" determined in 2a above.
- * ii.If the days match, then use "firstStartTime" else
- * use the first "day" *following* the day shown
- * in "firstStartTime" as the day of the event.
- * 3. If the PeriodWhich field in the Period structure is other
- * than XBSA_PERIOD_UNDEFINED, then successive events are
- * determined using the value of "periodData".
- * a. For seconds and days, the appropriate seconds or days
- * are added to the "firstStartTime" and step 2 to correct
- * for the day of the week (if needed) is applied again.
- * b. If a monthly period is specified, then the appropriate
- * number of months are added by incrementing the month index is
- * made (for example, a one month increment from February to
- * March). If the monthly date is not valid (for example, January
- * 30 --> February 30) then the last day of the desired month is
- * used (example January 30 --> February 28). Then step 2 is
- * followed to adjust for the requested day (which might move the
- * event time into the following month).
- */
-typedef enum {
- BSAPeriod_SECONDS = 1,
- BSAPeriod_DAYS = 2,
- BSAPeriod_MONTHS = 3,
- BSAPeriod_UNDEFINED = -9,
- BSAPeriod_DAILY = 4, BSAPeriod_WEEKLY = 5, BSAPeriod_MONTHLY = 6,
- BSAPeriod_QUARTERLY = 7, BSAPeriod_ANNUALLY = 8
-} PeriodWhich;
-
-typedef struct {
- PeriodWhich which;
- union {
- time_t nSeconds;
- BSA_Int16 nDays;
- BSA_Int16 nMonths;
- } periodData;
-} Period;
-
-/* ResourceType
- */
-typedef char ResourceType[BSA_MAX_RESOURCETYPE];
-
-/* RuleId
- */
-typedef BSA_UInt64 RuleId;
-
-/* Scheduleid
- */
-typedef BSA_UInt64 ScheduleId;
-
-/* AccessRight
- *
- * Constant Value Explanation
- * -------- ----- -----------
- * GET 1 Access right for getting an object from Backup
- * Services, also includes access right for querying
- * (getting attributes) an object from Backup Services.
- * QUERY 2 Access right for querying (getting attributes) an
- * object from Backup Services.
- */
-typedef enum {
- BSAAccessRight_GET = 1,
- BSAAcessRight_QUERY = 2
-} AccessRight;
-
-/* AccessRule
- */
-typedef struct {
+
+/* Operation
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * archive 1 Used to indicate that a scheduled operation is of
+ * type "archive".
+ * backup 2 Used to indicate that a scheduled operation is of
+ * type "backup".
+ */
+typedef enum {
+ BSAOperation_ARCHIVE = 1,
+ BSAOperation_BACKUP = 2
+} Operation;
+
+/* Period
+ *
+ * Use of the Period structure in a Schedule for an event:
+ * 1. The Schedule structure specifies 3 timing elements:
+ * a. "firstStartTime" - a timestamp showing the "earliest"
+ * possible time the event could take place
+ * b. "day" - the day of the week the event should occur
+ * c. "frequency" - the period between successive events
+ * 2. To determine the day the event should occur (this does
+ * not change the time of the event in the day):
+ * a. Determine the requested day from "firstStartTime".
+ * b. If "day" does not equal XBSA_DAYOFWEEK_ANY
+ * i. Compare "day" to the day of the week corresponding
+ * to "firstStartTime" determined in 2a above.
+ * ii.If the days match, then use "firstStartTime" else
+ * use the first "day" *following* the day shown
+ * in "firstStartTime" as the day of the event.
+ * 3. If the PeriodWhich field in the Period structure is other
+ * than XBSA_PERIOD_UNDEFINED, then successive events are
+ * determined using the value of "periodData".
+ * a. For seconds and days, the appropriate seconds or days
+ * are added to the "firstStartTime" and step 2 to correct
+ * for the day of the week (if needed) is applied again.
+ * b. If a monthly period is specified, then the appropriate
+ * number of months are added by incrementing the month index is
+ * made (for example, a one month increment from February to
+ * March). If the monthly date is not valid (for example, January
+ * 30 --> February 30) then the last day of the desired month is
+ * used (example January 30 --> February 28). Then step 2 is
+ * followed to adjust for the requested day (which might move the
+ * event time into the following month).
+ */
+typedef enum {
+ BSAPeriod_SECONDS = 1,
+ BSAPeriod_DAYS = 2,
+ BSAPeriod_MONTHS = 3,
+ BSAPeriod_UNDEFINED = -9,
+ BSAPeriod_DAILY = 4, BSAPeriod_WEEKLY = 5, BSAPeriod_MONTHLY = 6,
+ BSAPeriod_QUARTERLY = 7, BSAPeriod_ANNUALLY = 8
+} PeriodWhich;
+
+typedef struct {
+ PeriodWhich which;
+ union {
+ time_t nSeconds;
+ BSA_Int16 nDays;
+ BSA_Int16 nMonths;
+ } periodData;
+} Period;
+
+/* ResourceType
+ */
+typedef char ResourceType[BSA_MAX_RESOURCETYPE];
+
+/* RuleId
+ */
+typedef BSA_UInt64 RuleId;
+
+/* Scheduleid
+ */
+typedef BSA_UInt64 ScheduleId;
+
+/* AccessRight
+ *
+ * Constant Value Explanation
+ * -------- ----- -----------
+ * GET 1 Access right for getting an object from Backup
+ * Services, also includes access right for querying
+ * (getting attributes) an object from Backup Services.
+ * QUERY 2 Access right for querying (getting attributes) an
+ * object from Backup Services.
+ */
+typedef enum {
+ BSAAccessRight_GET = 1,
+ BSAAcessRight_QUERY = 2
+} AccessRight;
+
+/* AccessRule
+ */
+typedef struct {
RuleId ruleId; /* Provided by Backup Services */
ObjectName objName; /* Object name to be given access */
ObjectOwner objectOwner; /* BSA object owner and Applicaton object */
/* owner to be given access */
AccessRight rights; /* The access rights to be given */
-} AccessRule;
-
-/* ApiVersion
- */
-typedef struct {
+} AccessRule;
+
+/* ApiVersion
+ */
+typedef struct {
BSA_UInt16 version; /* Version of this API */
BSA_UInt16 release; /* Release of this API */
BSA_UInt16 level; /* Level of this API */
-} ApiVersion;
-
-/* ArchiveCopyData
- */
-typedef struct {
+} ApiVersion;
+
+/* ArchiveCopyData
+ */
+typedef struct {
CopyGpName cGName; /* Copy group name */
BSA_UInt16 freq; /* Archive frequency */
CopySerialization copySer; /* Copy serialization code */
CopyMode copyMode; /* Copy mode */
CopyGpDest destName; /* Copy destination name */
BSA_UInt16 retVersion; /* Retention time for the version */
-} ArchiveCopyData;
-
-/* BackupCopyData
- */
-typedef struct {
+} ArchiveCopyData;
+
+/* BackupCopyData
+ */
+typedef struct {
CopyGpName cGName; /* Copy group name */
BSA_UInt16 freq; /* Backup frequency */
CopySerialization copySer; /* Copy serialization code */
BSA_UInt16 verDataDel; /* Versions (data deleted) */
Period retXtraVer; /* Retain extra versions */
Period retOnlyVer; /* Retain only versions */
-} BackupCopyData;
-
-/* CopyGroup
- */
-typedef struct {
+} BackupCopyData;
+
+/* CopyGroup
+ */
+typedef struct {
CopyType copyType; /* Type of copy group: archive, backup, etc */
- union {
- ArchiveCopyData archive;
- BackupCopyData backup;
- } copyData;
-} CopyGroup;
-
-/* CopyId
- */
-typedef BSA_UInt64 CopyId;
-
-/* DataBlock
- */
-typedef struct {
- BSA_UInt16 bufferLen;
- BSA_UInt16 numBytes; /* Actual number of bytes read from */
- /* or written to the buffer, or the */
- /* minimum number of bytes needed */
- char * bufferPtr;
-} DataBlock;
-
-/* DayOfWeek
- */
-typedef enum {
- BSADayOfWeek_Monday = 1, BSADayOfWeek_Tuesday = 2,
- BSADayOfWeek_Wednesday = 3, BSADayOfWeek_Thursday = 4,
- BSADayOfWeek_Friday = 5, BSADayOfWeek_Saturday = 6,
- BSADayOfWeek_Sunday = 7
-} DayOfWeek;
-
-/* Environment
- */
-typedef struct {
+ union {
+ ArchiveCopyData archive;
+ BackupCopyData backup;
+ } copyData;
+} CopyGroup;
+
+/* CopyId
+ */
+typedef BSA_UInt64 CopyId;
+
+/* DataBlock
+ */
+typedef struct {
+ BSA_UInt16 bufferLen;
+ BSA_UInt16 numBytes; /* Actual number of bytes read from */
+ /* or written to the buffer, or the */
+ /* minimum number of bytes needed */
+ char * bufferPtr;
+} DataBlock;
+
+/* DayOfWeek
+ */
+typedef enum {
+ BSADayOfWeek_Monday = 1, BSADayOfWeek_Tuesday = 2,
+ BSADayOfWeek_Wednesday = 3, BSADayOfWeek_Thursday = 4,
+ BSADayOfWeek_Friday = 5, BSADayOfWeek_Saturday = 6,
+ BSADayOfWeek_Sunday = 7
+} DayOfWeek;
+
+/* Environment
+ */
+typedef struct {
char * envVariables; /* Identifies the Backup Services instance and other */
/* implementation-dependent variables such as */
/* communication ports, etc. Each variable is a */
/* (keyword, value) pair separated by a space. */
/* If a value contains spaces, it must be */
/* enclosed in single or double quotes. */
-} BSAEnvironment;
-
-/* Event
- */
-typedef struct {
+} BSAEnvironment;
+
+/* Event
+ */
+typedef struct {
BSA_UInt32 eventId; /* This is an internal (to Backup Services) id*/
ObjectOwner objectOwner;/* Identifies the owner of the event */
struct tm time; /* Identifies the time the action is to start */
ResourceType resourceType;/* Identifies the resource manager for the */
/* event */
EventInfo eventInfo; /* User- and resource-manager-specific info */
-} BSAEvent;
-
-/* MethodName
- */
-typedef char EncodingMethod[BSA_MAX_ENCODINGMETHOD];
-
-/* ObjectDescriptor
- */
-typedef struct {
+} BSAEvent;
+
+/* MethodName
+ */
+typedef char EncodingMethod[BSA_MAX_ENCODINGMETHOD];
+
+/* ObjectDescriptor
+ */
+typedef struct {
BSA_UInt32 version; /* Version number for this structure */
ObjectOwner Owner; /* Owner of the object */
ObjectName objName; /* Object name */
/* terminated with a null entry */
Description desc; /* Descriptive label for the object */
ObjectInfo objectInfo; /* Application information */
-} ObjectDescriptor;
-
-/* QueryDescriptor
- */
-typedef struct {
+} ObjectDescriptor;
+
+/* QueryDescriptor
+ */
+typedef struct {
ObjectOwner owner; /* Owner of the object */
ObjectName objName; /* Object name */
struct tm createTimeLB; /* Lower bound on create time */
/* wild card. */
/* Any undefined value is interpreted as */
/* an error. */
-
-/* Schedule
- */
-typedef struct {
+
+/* Schedule
+ */
+typedef struct {
ScheduleId schedId; /* Provided by Backup Services */
ObjectOwner objectOwner; /* Specifies the owner of the schedule */
Operation operation; /* Specifies the action to be taken */
ResourceType resourceType; /* Identifies the resource manager for the*/
/* schedule */
EventInfo scheduleInfo; /* Resource manager specific information */
-} Schedule;
-
-/* Security Token
- */
-typedef char SecurityToken[BSA_MAX_TOKEN_SIZE];
-
-/* StreamHandle
- */
-typedef int StreamHandle;
-
-/* UserDescriptor
- */
-typedef struct t_UserDescriptor {
+} Schedule;
+
+/* Security Token
+ */
+typedef char SecurityToken[BSA_MAX_TOKEN_SIZE];
+
+/* StreamHandle
+ */
+typedef int StreamHandle;
+
+/* UserDescriptor
+ */
+typedef struct t_UserDescriptor {
BSA_UInt16 version; /* Version num of this structure */
- BSAObjectOwner bsaObjectOwner; /* BSA Object owner name */
- DomainName domainName; /* Policy domain for the user */
- Description desc; /* User information */
-} UserDescriptor;
-
-/* Vote
- */
-typedef enum {
- BSAVote_COMMIT = 1,
- BSAVote_ABORT = 2
-} Vote;
-
+ BSAObjectOwner bsaObjectOwner; /* BSA Object owner name */
+ DomainName domainName; /* Policy domain for the user */
+ Description desc; /* User information */
+} UserDescriptor;
+
+/* Vote
+ */
+typedef enum {
+ BSAVote_COMMIT = 1,
+ BSAVote_ABORT = 2
+} Vote;
+
/* Function Prototypes for Data Movement API Subset
* Note that int and long have been replaced with typedefs
* from custom.h.
- */
+ */
-extern BSA_Int16
+extern BSA_Int16
BSABeginTxn
( long bsaHandle
);
-extern BSA_Int16
+extern BSA_Int16
BSAChangeToken
( long bsaHandle,
SecurityToken *oldTokenPtr,
SecurityToken *newTokenPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSACreateObject
( long bsaHandle,
ObjectDescriptor *objectDescriptorPtr,
DataBlock *dataBlockPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSACreateObjectF
( long bsaHandle,
ObjectDescriptor *objectDescriptorPtr,
StreamHandle *streamPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSADeleteObject
( long bsaHandle,
CopyType copyType,
CopyId *copyId
);
-extern BSA_Int16
+extern BSA_Int16
BSAEndData
( long bsaHandle
);
-extern BSA_Int16
+extern BSA_Int16
BSAEndTxn
( long bsaHandle,
Vote vote
DataBlock *dataBlockPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAGetEnvironment
( long bsaHandle,
ObjectOwner *objectOwnerPtr,
char **environmentPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAGetNextQueryObject
( long bsaHandle,
ObjectDescriptor *objectDescriptorPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAGetObject
( long bsaHandle,
ObjectDescriptor *objectDescriptorPtr,
DataBlock *dataBlockPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAGetObjectF
( long bsaHandle,
ObjectDescriptor *objectDescriptorPtr,
StreamHandle *streamPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAInit
( long *bsaHandleP,
SecurityToken *tokenPtr,
char **environmentPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAMarkObjectInactive
( long bsaHandle,
ObjectName *objectNamePtr
);
-extern void
+extern void
BSAQueryApiVersion
( ApiVersion *apiVersionPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSAQueryObject
( long bsaHandle,
QueryDescriptor *queryDescriptorPtr,
ObjectDescriptor *objectDescriptorPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSASendData
( long bsaHandle,
DataBlock *dataBlockPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSASetEnvironment
( long bsaHandle,
char **environmentPtr
);
-extern BSA_Int16
+extern BSA_Int16
BSATerminate
( long bsaHandle
);
/* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
XBSAGetData = BSAGetData;
XBSAQueryApiVersion = BSAQueryApiVersion;
XBSAGetEnvironment = BSAGetEnvironment;
-
+
if (!XBSAInit || !XBSABeginTxn || !XBSAEndTxn || !XBSATerminate ||
!XBSAQueryObject || !XBSAGetObject || !XBSAEndData ||
!XBSACreateObject || !XBSADeleteObject || !XBSAMarkObjectInactive ||
*/
if ((info->apiVersion.version == XBSA_TS_VERSION)
&& (info->apiVersion.release == XBSA_TS_RELEASE)) {
- /* XOPEN Techincal Standard Level!
+ /* XOPEN Techincal Standard Level!
* We are coded to the Preliminary Spec! Time to go boom!
*/
ELog(0,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* threadEntry.
* Creates an entry and puts it onto the savedEntries list.
- * Will retry up to 5 times if not enough memory. Hopfully, the
+ * Will retry up to 5 times if not enough memory. Hopfully, the
* Watcher thread will free up some memory for it to continue.
*/
/*
* flushSavedEntries
- * Runs through the list of savedEntries and adds the volumes and
+ * Runs through the list of savedEntries and adds the volumes and
* tapes to the database.
* A status of DUMP_NORETRYEOT means the tape(s) contains no useful data,
* and tapes and volumes should not be added to the DB.
free(entryPtr);
}
- /*
- * Add dump, tape, and volume entries to the list for the dbWatcher to
+ /*
+ * Add dump, tape, and volume entries to the list for the dbWatcher to
* flush. Volume entries are not added if the volume failed to dump.
*/
while ((entryPtr = dlqUnlinkf(&savedEntries))) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* 6) Ensure bucoord status calls work
*
* notes
- * pass 3:
+ * pass 3:
* keep token timeout. If no user reponse (idle time > some period)
* and tokens about to time out, terminate dump. This provides at
* least something usable.
/* notes
* 1) save the chunksize or otherwise ensure tape space remaining is
* check frequently enough
- * 2) This is called once. For partial dumps, need to
+ * 2) This is called once. For partial dumps, need to
* ensure that the tape device is left in the correct state for
* further dumps.
- *
+ *
*/
#define BIGCHUNK 102400
buffer = bufferBlock + BUTM_HDRSIZE;
/* Dump one volume fragment at a time until we dump the full volume.
- * A volume with more than 1 fragment means the volume will 'span'
+ * A volume with more than 1 fragment means the volume will 'span'
* 2 or more tapes.
*/
for (fragmentNumber = 1; !endofvolume; fragmentNumber++) { /*frag */
/* Determine how much data to read in upcoming RX_Read() call */
toread = dataSize;
/* Check if we are close to the EOT. There should at least be some
- * data on the tape before it is switched. HACK: we have to split a
- * volume across tapes because the volume trailer says the dump
- * continues on the next tape (and not the filemark). This could
- * result in a volume starting on one tape (no volume data dumped) and
- * continued on the next tape. It'll work, just requires restore to
+ * data on the tape before it is switched. HACK: we have to split a
+ * volume across tapes because the volume trailer says the dump
+ * continues on the next tape (and not the filemark). This could
+ * result in a volume starting on one tape (no volume data dumped) and
+ * continued on the next tape. It'll work, just requires restore to
* switch tapes. This allows many small volumes (<16K) to be dumped.
*/
kRemaining = butm_remainingKSpace(tapeInfoPtr);
dparamsPtr->curVolumeStatus = DUMP_SUCCESS;
error_exit:
- /*
+ /*
* If we hit the end, see if this is the first volume on the tape or not.
* Also, mark the tape as finished if the tape contains other dumps.
*/
}
}
- /*
+ /*
* This is used when an error occurs part way into a volume dump. Clean
* the tape state by writing an FileEnd mark. Forgo this action if we hit
* the end of tape.
bytesread += sizeof(hostVolumeHeader);
/* End the dump and transaction with the volserver. We end it now, before
- * we make the XBSA call because if XBSA blocks, we could time out on the
+ * we make the XBSA call because if XBSA blocks, we could time out on the
* volserver (After last read, the transaction with the volserver is idle).
*/
rc = rx_EndCall(fromcall, 0);
if (checkAbortByTaskId(taskId))
ERROR_EXIT(TC_ABORTEDBYREQUEST);
- /* Establish connection to volume - UV_ routine expects
- * host address in network order
+ /* Establish connection to volume - UV_ routine expects
+ * host address in network order
*/
if (CONF_XBSA) {
dvcode = xbsaDumpVolume(curDump, dparamsPtr);
break;
}
- /*
+ /*
* Log the error but ignore it since the dump is effectively done.
* Scantape may assume another volume and ask for next tape.
*/
* volume parameters describe the volume that failed
* entry:
* volumeName - name of volume
- * volumeId - volume id
+ * volumeId - volume id
* taskId - for job contrl
* fn return:
* character typed by user, one of r, o or a
/*
* Now have the right tape. Create a new label for the tape
- * Appended labels have the dump's dumpId - labels at beginnings of
+ * Appended labels have the dump's dumpId - labels at beginnings of
* tape have the initial dump's dumpId.
* Appended labels do not increment the useCount.
* Labels at beginnings of tape use the most future expiration of the dump set.
strcpy(vhptr->dumpSetName, nodePtr->dumpSetName);
strcpy(vhptr->preamble, "H++NAME#");
strcpy(vhptr->postamble, "T--NAME#");
-
+
return (code);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* process run some*/
select(0, 0, 0, 0, &twait);
- if (seconds > 0) { /* we only worry about elapsed time if
+ if (seconds > 0) { /* we only worry about elapsed time if
* not looping forever (seconds < 0) */
time(&nowTime);
timeleft = seconds - difftime(nowTime, startTime);
* Input:
* seconds - how long to wait for a key press.
* *key - char entered by user
- * Return Values:
+ * Return Values:
* 0 - Time ran out before the user typed a key.
* 1 - Valid char is being returned.
*
}
/* PromptForTape
- * Prompt the operator to change the tape.
+ * Prompt the operator to change the tape.
* Use to be a void routine but now returns an error. Some calls
* don't use the error code.
* notes:
}
/* lastbuf is last block read and it has nbytes of data
- * startWbuf is the 2nd to last block read
+ * startWbuf is the 2nd to last block read
* Seach for the volume trailer in these two blocks.
*/
if (lastbuf == startWbuf)
if (!tapeVolTrailer.contd)
break; /* We've read the entire volume */
- /* Volume is continued on next tape.
+ /* Volume is continued on next tape.
* Step to the next volume fragment and prompt for its tape.
* When a volume has multiple frags, those frags are on different
* tapes. So we know that we need to prompt for a tape.
/* restoreVolume function takes care of all the related fragments
* spanning various tapes. On return the complete volume has been
- * restored
+ * restored
*/
if (CONF_XBSA) {
tcode = xbsaRestoreVolume(taskId, RestoreDesc, &rparams);
/* updateTapeLabel
* given the label on the tape, delete any old information from the
- * database.
+ * database.
* Deletes all entries that match the volset.dumpnode
* and the dump path.
if ((strcmp(newLabelPtr->AFSName, "") != 0)
&& (strcmp(oldLabel.pName, "") != 0)) {
- /* We are setting the AFS name, yet tape
+ /* We are setting the AFS name, yet tape
* has a permanent name (not allowed).
*/
TLog(taskId, "Can't label. Tape has permanent label '%s'\n",
printf("-- End of tape label --\n\n");
}
-/* ReadLabel
+/* ReadLabel
* Read the label from a tape.
* Currently prints out a "detailed" summary of the label but passes
* back only selected fields.
int nextSplice = sizeof(struct volumeHeader) - firstSplice - padLen;
/* Four cases are to be handled
- *
+ *
* Volume Header (byte alignment)
* -----------------------
* Tape In Core
* Case 3: 1 1
* Case 4: 1 4
* -----------------------
- *
+ *
* Case 2 and Case 3 are identical cases and handled the same way.
* Case 1 and Case 4 are separate cases. In one case the pad needs
* to be removed and in the other, it needs to be spliced in. The
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* PrintVolumeHeader
- * print the contents of a volume header.
+ * print the contents of a volume header.
*/
static void
PrintVolumeHeader(struct volumeHeader *volHeader)
chunkSize += BIGCHUNK;
}
- /*
- * Read volume date - If prematurely hit the HW EOF
+ /*
+ * Read volume date - If prematurely hit the HW EOF
* marker, check to see if data contains a volumetrailer.
*/
rcode =
*bytesRead -= sizeof(struct volumeHeader);
}
- /*
- * If we didn't hit the EOF while reading data, read FileEnd marker
- * or EOF marker.
+ /*
+ * If we didn't hit the EOF while reading data, read FileEnd marker
+ * or EOF marker.
*/
if (!rcode) {
tcode = butm_ReadFileEnd(curTapePtr);
/* nextTapeLabel
* generate the name of the next tape label expected
- * exit:
+ * exit:
* ptr to static string
*/
continue;
}
- /* No volume was found. We may have hit the EOT or a
+ /* No volume was found. We may have hit the EOT or a
* bad-spot. Try to skip over this spot.
*/
if (badscan < 2) { /* allow 2 errors, then fail */
PrintVolumeHeader(&volHeader);
/* If this is not the first volume fragment, make sure it follows
- * the last volume fragment
+ * the last volume fragment
*/
if (volEntry.dump) {
if ((volEntry.dump != volHeader.dumpID)
/* ScanDumps
* This set of code fragments read a tape, and add the information to
* the database. Builds a literal structure.
- *
+ *
*/
void *
ScanDumps(void *param)
{
struct scanTapeIf *ptr = (struct scanTapeIf *)param;
-
+
struct butm_tapeInfo curTapeInfo;
struct tapeScanInfo tapeScanInfo;
afs_uint32 taskId;
* The routine assumes that tape names have an embedded sequence number
* as the trialing component. It is suggested that any tape naming
* changes retain the trailing seq. number
- * entry:
- * tapename - ptr to tape name
+ * entry:
+ * tapename - ptr to tape name
* exit:
* 0 or positive - sequence number
* -1 - error, couldn't extract sequence number
}
/* databaseTape
- * returns true or false depending on whether the tape is
+ * returns true or false depending on whether the tape is
* a database tape or not.
*/
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
- if (ccode == 1)
+ if (ccode == 1)
host = SHostAddrs[0];
}
/* Create a single security object, in this case the null security
* object, for unauthenticated connections, which will be used to control
- * security on connections made to this server
+ * security on connections made to this server
*/
securityObjects[0] = rxnull_NewServerSecurityObject();
exit(1);
}
/* This call is here to verify that we are authentiated.
- * The call does nothing and will return BUDB_NOTPERMITTED
+ * The call does nothing and will return BUDB_NOTPERMITTED
* if we don't belong.
*/
code = bcdb_deleteDump(0, 0, 0, 0);
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
void * KeepAlive(void *);
/* CreateDBDump
- * create a dump entry for a saved database
+ * create a dump entry for a saved database
*/
afs_int32
goto getNewTape;
}
- /* On first tape, the savedb has not started yet, so the database is not locked
+ /* On first tape, the savedb has not started yet, so the database is not locked
* and we can therefore, access information from it. This is easier to do because
* database dumps don't have appended dumps (nor appended).
*/
struct budb_dumpEntry de, de2;
/* Verify the tape has not expired
- * Early database dumps don't have a dumpid
+ * Early database dumps don't have a dumpid
*/
if (!tapeExpired(&oldTapeLabel)) {
TLog(taskId, "This tape has not expired\n");
}
/* Otherwise, the savedb is in progress and we can't
- * access the database (it's locked). So we rely on the
+ * access the database (it's locked). So we rely on the
* information available (and not the backup database).
*/
else {
}
/* addTapesToDb
- * With the list of tapes, add them to the database.
+ * With the list of tapes, add them to the database.
* Also delete any olddumpids that are around.
*/
memset(writeBuffer, 0, BUTM_BLKSIZE);
maxReadSize = 1024;
- /*
- * The margin of space to check for end of tape is set to the
- * amount of space used to write an end-of-tape multiplied by 2.
+ /*
+ * The margin of space to check for end of tape is set to the
+ * amount of space used to write an end-of-tape multiplied by 2.
* The amount of space is size of a 16K EODump marker, its EOF
* marker, and up to two EOF markers done on close (1 16K blocks +
- * 3 EOF * markers).
+ * 3 EOF * markers).
*/
tc_EndMargin = (16384 + 3 * globalTapeConfig.fileMarkSize) * 2;
tc_KEndMargin = tc_EndMargin / 1024;
&wroteLabel);
/*
- * If did not write the label, remove created dump
+ * If did not write the label, remove created dump
* Else if wrote the label, remove old dump from db so it's not saved.
*/
if (!wroteLabel) {
}
/* KeepAlive
- *
- * While dumping the database, keeps the connection alive.
+ *
+ * While dumping the database, keeps the connection alive.
* Every 10 seconds, wake up and ask to read 0 bytes of the database.
- * This resets the database's internal timer so that it does not
+ * This resets the database's internal timer so that it does not
* prematuraly quit (on asking for new tapes and such).
- *
+ *
* Use the same udbHandle as writeDbDump so we go to the same server.
*/
void *
* nextHeader - ptr to structure for return value
* exit:
* nextHeader - next structure header from tape
- * notes:
+ * notes:
* upon entry, the dump structure header has been read confirming that
* a database dump tree exists on the tape
*/
/* getTapeData
* Read information from tape, and place the requested number of bytes
- * in the buffer supplied
+ * in the buffer supplied
* entry:
* tapeInfo
* rstTapeInfoPtr - Info about the dump being restored.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
rx_SetRxDeadTime(60);
- /*
- * Connect to buserver
+ /*
+ * Connect to buserver
*/
cellName[0] = '\0';
code = udbClientInit(0, 0, cellName);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct butm_tapeLabel tapeLabelWrite, tapeLabelRead;
/* -------------
- * General Setup
+ * General Setup
* ------------- */
initialize_BUTM_error_table();
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* blockMark contains a magic number and counts of real data bytes
* written out in the block.
*
- * each file is preceeded by a fileMark, which acts as the file
+ * each file is preceeded by a fileMark, which acts as the file
* delimiter. A file consists of contigous data blocks. TM does
- * understand or interrpet the data in data blocks.
+ * understand or interrpet the data in data blocks.
*
* The tape begins with a tape label and ends with EOF file markers
* in succession (2 or 4 of them ).
/* ----------------------------------------------------------------------
* These routines use the usd library to perform tape operations.
- * ForkIoctl, ForkOpen, ForkClose, ForwardSpace, BackwardSpace, WriteEOF,
+ * ForkIoctl, ForkOpen, ForkClose, ForwardSpace, BackwardSpace, WriteEOF,
* PrepareAccess(nt), ShutdownAccess(nt)
- *
+ *
* Return Values: USD functions return 0 if successful or errno if failed.
*/
/* ------------------ USD Interface Functions Begin ------------------------ */
* TO ALSO MAKE THE SAME CHANGES IN bu_utils/fms.c.
*
* add the supplied no. of bytes to the byte count of data placed
- * on the tape. Also check for reaching 2GB limit and reset the
+ * on the tape. Also check for reaching 2GB limit and reset the
* pointer if necessary. This allows us to use >2GB tapes.
* entry:
* fid - file id for the tape.
}
/*
- * This accounts for tape drives with a block size different from variable or 16K
+ * This accounts for tape drives with a block size different from variable or 16K
* blocks and only reads that block size.
*/
afs_int32 TapeBlockSize;
}
static afs_int32
-WriteTapeBlock(struct butm_tapeInfo *info,
+WriteTapeBlock(struct butm_tapeInfo *info,
char *buffer, /* assumed to be 16384 bytes with data in it */
afs_int32 length, /* amount data in buffer */
afs_int32 blockType)
}
static afs_int32
-ReadTapeBlock(struct butm_tapeInfo *info,
+ReadTapeBlock(struct butm_tapeInfo *info,
char *buffer, /* assumed to be 16384 bytes */
afs_int32 *blockType)
{
*/
static afs_int32
-check(struct butm_tapeInfo *info,
+check(struct butm_tapeInfo *info,
int write) /* write operation requested */
{
struct progress *p;
*/
static afs_int32
-file_WriteLabel(struct butm_tapeInfo *info, struct butm_tapeLabel *label,
+file_WriteLabel(struct butm_tapeInfo *info, struct butm_tapeLabel *label,
afs_int32 rewind)
{
afs_int32 code = 0;
tlabel->label.useCount = htonl(tlabel->label.useCount);
tlabel->label.dumpid = htonl(tlabel->label.dumpid);
- /*
- * write the tape label - For appends, the write may need to skip
- * over 1 or 2 EOF marks that were written when tape was closed after
+ /*
+ * write the tape label - For appends, the write may need to skip
+ * over 1 or 2 EOF marks that were written when tape was closed after
* the last dump. Plus, some AIX tape drives require we try forwarding
* over the last EOF and take an error before we can write the new label.
* ---------------------------------------------------------------------- */
}
static afs_int32
-file_ReadLabel(struct butm_tapeInfo *info, struct butm_tapeLabel *label,
+file_ReadLabel(struct butm_tapeInfo *info, struct butm_tapeLabel *label,
afs_int32 rewind)
{
struct tapeLabel *tlabel;
/*
* When appended labels were written, either 1 or 2 EOF marks may
- * have had to be skipped. When reading a label, these EOF marks
+ * have had to be skipped. When reading a label, these EOF marks
* must also be skipped. When an EOF is read, 0 bytes are returned
* (refer to the write calls in file_WriteLabel routine).
* ---------------------------------------------------------------- */
return (code);
}
-/* Read a SW filemark, verify that it is a SW filemark, then skip to the next
- * HW filemark. If the read of the SW filemark shows it's an EOF, then
+/* Read a SW filemark, verify that it is a SW filemark, then skip to the next
+ * HW filemark. If the read of the SW filemark shows it's an EOF, then
* ignore that the SW filemark is not there and return 0 (found the SW filemark
* missing with some 3.1 dumps).
*/
}
/*
- * Seek to the EODump (end-of-dump) after the given position. This is
- * the position after the EOF filemark immediately after the EODump mark.
+ * Seek to the EODump (end-of-dump) after the given position. This is
+ * the position after the EOF filemark immediately after the EODump mark.
* This is for tapes of version 4 or greater.
*/
static afs_int32
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int isafile = 0, debugLevel = 1;
-/* Format of the config file is now
+/* Format of the config file is now
* <capacity devicename portno isafile>
* capacity - size of tape or file in bytes
* devicename - tape device or file name to write data into
- * portno - tape coordinator port no. (irrelevant)
- * isafile - Is this entry a file or a tape?
+ * portno - tape coordinator port no. (irrelevant)
+ * isafile - Is this entry a file or a tape?
*
* test_ftm goes through the lines in the config file and selects the
* entry that has a port no. of 0 and tries to open the device.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/*
- * Before calling the beforeProc and afterProc and all the implications
+ * Before calling the beforeProc and afterProc and all the implications
* from those calls, check if the help procedure was called and call it now.
*/
if ((ts->proc == HelpProc) || (ts->proc == AproposProc)) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
const char *, va_list);
#define __AFS_COM_ERR_H
-#ifdef AFS_OLD_COM_ERR
+#ifdef AFS_OLD_COM_ERR
#define com_err afs_com_err
#define com_err_va afs_com_err_va
#define error_table_name afs_error_table_name
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
#ifdef __GNUC__
int yyparse(void);
#endif
-\f
+
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else /* not GNU C or C++ */
#endif
#endif
-\f
+
#line 192 "bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
}
/* the action file gets copied in in place of this dollarsign */
#line 487 "bison.simple"
-\f
+
yyvsp -= yylen;
yyssp -= yylen;
#ifdef YYLSP_NEEDED
#include "mit-sipb-cr.h"
#include <stdio.h>
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
typedef union {
char *dynstr;
-
+
} YYSTYPE;
#define ERROR_TABLE 258
#endif
#line 23 "et_lex.lex.l"
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFSOP_SET_BACKUPTREE 37 /* enable backup tree support */
#define AFSOP_SET_RXPCK 38 /* set rx_extraPackets*/
#define AFSOP_BUCKETPCT 39 /* bucket percentage */
-#define AFSOP_SET_RXMAXMTU 40 /* set rx_MyMaxSendSize,rx_maxReceiveSizeUser,rx_maxReceiveSize */
+#define AFSOP_SET_RXMAXMTU 40 /* set rx_MyMaxSendSize,rx_maxReceiveSizeUser,rx_maxReceiveSize */
#define AFSOP_BKG_HANDLER 41 /* userspace-capable Bkg daemon */
/* The range 20-30 is reserved for AFS system offsets in the afs_syscall */
#ifdef AFS_SGI53_ENV
#define AFSOP_NFSSTATICADDR 32 /* to contents addr of nfs kernel addr */
-#define AFSOP_NFSSTATICADDRPTR 33 /* pass addr of variable containing
+#define AFSOP_NFSSTATICADDRPTR 33 /* pass addr of variable containing
* address into kernel. */
#define AFSOP_NFSSTATICADDR2 34 /* pass address in as hyper. */
#define AFSOP_SBLOCKSTATICADDR2 35 /* for sblock and sbunlock */
#define AFSOP_CACHEDIRS 51 /* number of files per dir */
#define AFSOP_CACHEFILES 52 /* number of files */
-#define AFSOP_SETINT 60 /* we should just set key/value pairs
+#define AFSOP_SETINT 60 /* we should just set key/value pairs
for things which are just ints */
/* these are for initialization flags */
/* Defines and structures for the AFS proc replacement layer for the original syscall (AFS_SYSCALL) strategy */
#ifdef AFS_LINUX20_ENV
-
+
#define PROC_FSDIRNAME "openafs"
#define PROC_SYSCALL_NAME "afs_ioctl"
#define PROC_SYSCALL_FNAME "/proc/fs/openafs/afs_ioctl"
#define PROC_RX_NAME "rx"
#define PROC_SERVICES_NAME "rx_services"
#define PROC_RXSTATS_NAME "rx_stats"
-#define VIOC_SYSCALL_TYPE 'C'
+#define VIOC_SYSCALL_TYPE 'C'
#define VIOC_SYSCALL _IOW(VIOC_SYSCALL_TYPE,1,void *)
#define VIOC_SYSCALL32 _IOW(VIOC_SYSCALL_TYPE,1,int)
-
+
struct afsprocdata {
long param4;
long param3;
unsigned int param1;
unsigned int syscall;
};
-
+
#endif
#ifdef AFS_DARWIN80_ENV
unsigned int syscall;
unsigned int retval;
};
-#define VIOC_SYSCALL_TYPE 'C'
+#define VIOC_SYSCALL_TYPE 'C'
#define VIOC_SYSCALL _IOWR(VIOC_SYSCALL_TYPE,1,struct afssysargs)
#define VIOC_SYSCALL64 _IOWR(VIOC_SYSCALL_TYPE,2,struct afssysargs64)
#define SYSCALL_DEV_FNAME "/dev/openafs_ioctl"
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define SYS_NAME_ID_amd64_obsd46 4015
/*
- * Placeholder to keep system-wide standard flags since this file is included by all
+ * Placeholder to keep system-wide standard flags since this file is included by all
* files (i.e in afs/param.h)
*/
#ifdef notdef
#define SIZEOF_LONG 4
/* Define to `unsigned' if <sys/types.h> doesn't define. */
-//#undef size_t unsigned int
+//#undef size_t unsigned int
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
alist[1] = "all";
/* This allows JUST arch or JUST OS/version,
- * Linux 2.6 uses the in-kernel build system, so
+ * Linux 2.6 uses the in-kernel build system, so
* just 'linux26' is enough. */
sysname = strdup (alist[0]);
alist[2] = strchr (sysname, '_');
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define MAXMODS_DEBUG 20
#ifdef AFSDEBUG_DECLARE
-/*
+/*
* Should get here only once per kernel instance!
*/
char afsdebug[MAXMODS_DEBUG] =
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
fprintf(fpVers, "Base configuration %s\n",
stateDeltas[i].name);
} else if (cfgFormat == CF_XML) {
- fprintf(fpVers,
+ fprintf(fpVers,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<revision>\n"
"<revnumber>\n"
fprintf(fpVers, "%c%s\n", stateDeltas[i].type,
stateDeltas[i].name);
} else if (cfgFormat == CF_XML) {
- fprintf(fpVers,
+ fprintf(fpVers,
"<revremark>\n"
";%c%s"
"</revremark>\n",
fprintf(fpVers, "%c%s\n", stateDeltas[i].type,
stateDeltas[i].name);
} else if (cfgFormat == CF_XML) {
- fprintf(fpVers,
+ fprintf(fpVers,
"<revremark>\n"
";%c%s"
"</revremark>\n",
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define lstat(a, b) _stat((a), (struct _stat32 *)(b))
#else
#define lstat(a, b) _stat((a), (struct _stat64i32 *)(b))
-#endif
+#endif
#endif
#if 0
#define DARWIN_REFBASE 3
#define AFS_WARNUSER_MARINER_ENV 1
#define AFS_CACHE_VNODE_PATH
-#define NEED_IOCTL32
+#define NEED_IOCTL32
/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS "afs"
#define SYS_NAME "ppc64_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_ppc64_darwin_100
#define AFSBIG_ENDIAN 1
-#elif defined(__i386__)
+#elif defined(__i386__)
#define sys_x86_darwin_12 1
#define sys_x86_darwin_13 1
#define sys_x86_darwin_14 1
#define SYS_NAME "x86_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_x86_darwin_100
#define AFSLITTLE_ENDIAN 1
-#elif defined(__amd64__)
+#elif defined(__amd64__)
#define sys_x86_darwin_12 1
#define sys_x86_darwin_13 1
#define sys_x86_darwin_14 1
#define SYS_NAME "amd64_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_amd64_darwin_100
#define AFSLITTLE_ENDIAN 1
-#elif defined(__arm__)
+#elif defined(__arm__)
#define sys_arm_darwin_100 1
#define SYS_NAME "arm_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_arm_darwin_100
#define SYS_NAME "amd64_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_amd64_darwin_100
#define AFSLITTLE_ENDIAN 1
-#elif defined(__arm__)
+#elif defined(__arm__)
#define sys_arm_darwin_100 1
#define SYS_NAME "arm_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_arm_darwin_100
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define memcmp(A, B, S) bcmp(A, B, S)
#endif
#endif /* KERNEL */
-#define AFS_DIRENT
+#define AFS_DIRENT
/* Non-standard definitions */
#ifndef EDQUOT
#define EDQUOT 69 /* Disc quota exceeded */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
#ifdef AFS_SMP
-#ifndef CONFIG_X86_LOCAL_APIC
+#ifndef CONFIG_X86_LOCAL_APIC
#define CONFIG_X86_LOCAL_APIC 1
#endif
#endif
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define lstat(a, b) _stat((a), (struct _stat32 *)(b))
#else
#define lstat(a, b) _stat((a), (struct _stat64i32 *)(b))
-#endif
+#endif
#endif
#if 0
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define lstat(a, b) _stat((a), (struct _stat32 *)(b))
#else
#define lstat(a, b) _stat((a), (struct _stat64i32 *)(b))
-#endif
+#endif
#endif
#if 0
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define memcmp(A, B, S) bcmp(A, B, S)
#endif
#endif /* KERNEL */
-#define AFS_DIRENT
+#define AFS_DIRENT
/* Non-standard definitions */
#ifndef EDQUOT
#define EDQUOT 69 /* Disc quota exceeded */
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
#endif /* KERNEL */
-#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
#endif /* _KERNEL */
#else /* !defined(UKERNEL) */
#endif
#endif /* KERNEL */
-#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
#endif /* _KERNEL */
#else /* !defined(UKERNEL) */
#endif
#endif /* KERNEL */
-#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
#endif /* _KERNEL */
#else /* !defined(UKERNEL) */
#endif
#endif /* KERNEL */
-#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
#endif /* _KERNEL_DEPRECATED */
#else /* !defined(UKERNEL) */
#endif
#endif /* KERNEL */
-#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
+#endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ && !defined(IGNORE_STDS_H) */
#endif /* _KERNEL */
#else /* !defined(UKERNEL) */
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
- * Thanks to Jim Rees and University of Michigan CITI, for the initial
+ * Thanks to Jim Rees and University of Michigan CITI, for the initial
* OpenBSD porting work.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFS_SYSCALL 227
#define AFSBIG_ENDIAN 1
-/* glibc doesn't implement getcontext/savecontext for 32-bit sparc, so
+/* glibc doesn't implement getcontext/savecontext for 32-bit sparc, so
never use UCONTEXT here. */
#undef USE_UCONTEXT
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
- */
-
+ */
+
#ifndef AFS_PARAM_H
#define AFS_PARAM_H
-
+
#define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */
#define AFS_ENV 1
#define AFS_SUN_ENV 1
#define AFS_SUN4_ENV 1
-
+
#include <afs/afs_sysnames.h>
-
+
#define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */
#define AFS_GLOBAL_SUNLOCK 1 /* For global locking */
-
+
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
#define AFS_SYSCALL 31
-
-/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS "afs"
-
-/* Machine / Operating system information */
+
+/* Machine / Operating system information */
#define sys_sun4_413 1
#define SYS_NAME "sun4_413"
#define SYS_NAME_ID SYS_NAME_ID_sun4_411
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_STATVFS 0
#define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */
-
+
#define KERNEL_HAVE_UERROR 1
-
-/* Extra kernel definitions (from kdefs file) */
+
+/* Extra kernel definitions (from kdefs file) */
#ifdef KERNEL
-/* sun definitions here */
+/* sun definitions here */
#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
#define VATTR_NULL vattr_null
#endif /* KERNEL */
#define memset(A, B, S) bzero(A, S)
-#define memcpy(B, A, S) bcopy(A, B, S)
+#define memcpy(B, A, S) bcopy(A, B, S)
#define memcmp(A, B, S) bcmp(A, B, S)
#define memmove(B, A, S) bcopy(A, B, S)
-#define AFS_DIRENT
+#define AFS_DIRENT
#ifndef CMSERVERPREF
#define CMSERVERPREF
#endif /* */
-
+
#endif /* AFS_PARAM_H */
#else /* !defined(UKERNEL) */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
- */
-
+ */
+
#ifndef AFS_PARAM_H
#define AFS_PARAM_H
-
+
#define UKERNEL
#define AFS_ENV 1
-/* define AFS_USR_XXX_ENV XXX */
-
+/* define AFS_USR_XXX_ENV XXX */
+
#include <afs/afs_sysnames.h>
-
+
#define RXK_LISTENER_ENV 1
#define AFS_USERSPACE_IP_ADDR 1
#define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */
-
+
#define AFS_3DISPARES 1 /* Utilize the 3 available disk inode 'spares' */
#define AFS_SYSCALL 31
-
-/* File system entry (used if mount.h doesn't define MOUNT_AFS */
+
+/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS 1
-
-/* Machine / Operating system information */
+
+/* Machine / Operating system information */
#define sys_sun4_413 1
#define SYS_NAME "sun4_413"
#define SYS_NAME_ID SYS_NAME_ID_sun4_411
#define AFSBIG_ENDIAN 1
#define AFS_HAVE_FFS 1 /* Use system's ffs. */
#define AFS_HAVE_STATVFS 0
-
-/* Extra kernel definitions (from kdefs file) */
+
+/* Extra kernel definitions (from kdefs file) */
#ifdef KERNEL
-/* sun definitions here */
+/* sun definitions here */
#define AFS_UIOFMODE 1 /* Only in afs/afs_vnodeops.c (afs_ustrategy) */
#define afsio_iov uio_iov
#define afsio_iovcnt uio_iovcnt
#define AFS_MINCHANGE 2
#define VATTR_NULL usr_vattr_null
#endif /* KERNEL */
-#define AFS_DIRENT
+#define AFS_DIRENT
#ifndef CMSERVERPREF
#define CMSERVERPREF
#endif /* */
-
+
#endif /* AFS_PARAM_H */
#endif /* !defined(UKERNEL) */
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
#define AFS_BOZONLOCK_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFS_X86_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFS_X86_ENV 1
#define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */
-#define AFS_64BIT_CLIENT 1
+#define AFS_64BIT_CLIENT 1
#define AFS_HAVE_FLOCK_SYSID 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define DARWIN_REFBASE 3
#define AFS_WARNUSER_MARINER_ENV 1
#define AFS_CACHE_VNODE_PATH
-#define NEED_IOCTL32
+#define NEED_IOCTL32
/* File system entry (used if mount.h doesn't define MOUNT_AFS */
#define AFS_MOUNT_AFS "afs"
#define SYS_NAME "ppc64_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_ppc64_darwin_100
#define AFSBIG_ENDIAN 1
-#elif defined(__i386__)
+#elif defined(__i386__)
#define sys_x86_darwin_12 1
#define sys_x86_darwin_13 1
#define sys_x86_darwin_14 1
#define SYS_NAME "x86_darwin_100"
#define SYS_NAME_ID SYS_NAME_ID_x86_darwin_100
#define AFSLITTLE_ENDIAN 1
-#elif defined(__amd64__)
+#elif defined(__amd64__)
#define sys_x86_darwin_12 1
#define sys_x86_darwin_13 1
#define sys_x86_darwin_14 1
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
typedef unsigned long long afs_uint64;
#endif
#define ZeroInt64(a) (a = 0)
-#define AssignInt64(a, b) *(b) = (a)
+#define AssignInt64(a, b) *(b) = (a)
#define IncInt64(a) (*(a))++
#define IncUInt64(a) (*(a))++
#define DecInt64(a) (*(a))--
#define GEInt64(a,b) (((a).high > (b).high) || (((a).high == (b).high) && ((a).low >= (b).low)))
#define LEInt64(a,b) (((a).high < (b).high) || (((a).high == (b).high) && ((a).low <= (b).low)))
#define LTInt64(a,b) (((a).high < (b).high) || (((a).high == (b).high) && ((a).low < (b).low)))
-#define CompareInt64(a,b) (((afs_int32)(a).high - (afs_int32)(b).high) || (((a).high == (b).high) && ((a).low - (b).low)))
-#define AddInt64(a, b, c) { afs_int64 _a, _b; _a = a; _b = b; (c)->low = _a.low + _b.low; (c)->high = _a.high + _b.high + ((c)->low < _b.low); }
-#define SubtractInt64(a, b, c) { afs_int64 _a, _b; _a = a; _b = b; (c)->low = _a.low - _b.low; (c)->high = _a.high - _b.high - (_a.low < _b.low); }
-#define CompareUInt64(a,b) (((afs_uint32)(a).high - (afs_uint32)(b).high) || (((a).high == (b).high) && ((a).low - (b).low)))
-#define AddUInt64(a, b, c) { afs_uint64 _a, _b; _a = a; _b = b; (c)->low = _a.low + _b.low; (c)->high = _a.high + _b.high + ((c)->low < _b.low); }
-#define SubtractUInt64(a, b, c) { afs_uint64 _a, _b; _a = a; _b = b; (c)->low = _a.low - _b.low; (c)->high = _a.high - _b.high - (_a.low < _b.low); }
+#define CompareInt64(a,b) (((afs_int32)(a).high - (afs_int32)(b).high) || (((a).high == (b).high) && ((a).low - (b).low)))
+#define AddInt64(a, b, c) { afs_int64 _a, _b; _a = a; _b = b; (c)->low = _a.low + _b.low; (c)->high = _a.high + _b.high + ((c)->low < _b.low); }
+#define SubtractInt64(a, b, c) { afs_int64 _a, _b; _a = a; _b = b; (c)->low = _a.low - _b.low; (c)->high = _a.high - _b.high - (_a.low < _b.low); }
+#define CompareUInt64(a,b) (((afs_uint32)(a).high - (afs_uint32)(b).high) || (((a).high == (b).high) && ((a).low - (b).low)))
+#define AddUInt64(a, b, c) { afs_uint64 _a, _b; _a = a; _b = b; (c)->low = _a.low + _b.low; (c)->high = _a.high + _b.high + ((c)->low < _b.low); }
+#define SubtractUInt64(a, b, c) { afs_uint64 _a, _b; _a = a; _b = b; (c)->low = _a.low - _b.low; (c)->high = _a.high - _b.high - (_a.low < _b.low); }
#define NonZeroInt64(a) (a).low || (a).high
#define Int64ToInt32(a) (a).low
#define FillInt64(t,h,l) (t).high = (h); (t).low = (l);
#define AFS_DEMAND_ATTACH_FS 1
#endif
-/* A macro that can be used when printf'ing 64 bit integers, as Unix and
+/* A macro that can be used when printf'ing 64 bit integers, as Unix and
* windows use a different format string
*/
#ifdef AFS_NT40_ENV
# endif /* PRINTF_TAKES_Z_LEN */
#endif /* AFS_NT40_ENV */
-/* Functions to safely cast afs_int32 and afs_uint32 so they can be used in
+/* Functions to safely cast afs_int32 and afs_uint32 so they can be used in
* printf statemements with %ld and %lu
*/
#ifdef AFS_NT40_ENV
/* touch.c : Defines the entry point for the console application.*/
/* Copyright 2000, International Business Machines Corporation and others.
All Rights Reserved.
-
+
This software has been released under the terms of the IBM Public
License. For details, see the LICENSE file in the top-level source
directory or online at http://www.openafs.org/dl/license10.html
/* Copyright 2000, International Business Machines Corporation and others.
All Rights Reserved.
-
+
This software has been released under the terms of the IBM Public
License. For details, see the LICENSE file in the top-level source
directory or online at http://www.openafs.org/dl/license10.html
} else
usage();
break;
- case 3: //1.0.401 or 1.0.40a are the same;
+ case 3: //1.0.401 or 1.0.40a are the same;
if ((isdigit(*ptr) == 0) // first 2 must be digit
|| (isdigit(*(ptr + 1)) == 0)
- || (*(ptr + 1) != '0' && isdigit(*(ptr + 2)) == 0) // disallow 1.0.4b0 or 1.0.41a
+ || (*(ptr + 1) != '0' && isdigit(*(ptr + 2)) == 0) // disallow 1.0.4b0 or 1.0.41a
)
usage();
pat = *ptr - '0';
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*
* Under U.S. law, this software may not be exported outside the US
* without license from the U.S. Commerce department.
- *
+ *
* These routines form the library interface to the DES facilities.
*
* spm 8/85 MIT project athena
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif /* LARGEDATA */
STATIC void init_des(void);
-STATIC void init_perm(C_block [64 / CHUNKBITS][1 << CHUNKBITS],
+STATIC void init_perm(C_block [64 / CHUNKBITS][1 << CHUNKBITS],
unsigned char [64], int, int);
STATIC int des_setkey(const char *key);
STATIC int des_cipher(const char *in, char *out, long salt, int num_iter);
* "perm" must be all-zeroes on entry to this routine.
*/
STATIC void
-init_perm(C_block perm[64 / CHUNKBITS][1 << CHUNKBITS],
+init_perm(C_block perm[64 / CHUNKBITS][1 << CHUNKBITS],
unsigned char p[64], int chars_in, int chars_out)
{
int i, j, k, l;
} else
#endif
{
- *((afs_uint32*)cipher)= L2;
+ *((afs_uint32*)cipher)= L2;
cipher = ((afs_int32 *)cipher)+1;
*((afs_uint32 *)cipher) = R2;
}
* This file contains configuration information for the DES library
* which is machine specific; currently, this file contains
* configuration information for the vax, the "ibm032" (RT), and
- * the "PC8086" (IBM PC).
+ * the "PC8086" (IBM PC).
*
* Note: cross-compiled targets must appear BEFORE their corresponding
* cross-compiler host. Otherwise, both will be defined when running
* the native compiler on the programs that construct cross-compiled
- * sources.
+ * sources.
*/
#include <afs/param.h>
*
* Note: this routine calls des_set_random_generator_seed.
*/
-#if !defined(BSDUNIX) && !defined(AFS_SGI_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
+#if !defined(BSDUNIX) && !defined(AFS_SGI_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN_ENV)
you lose ... (aka, you get to implement an analog of this for your system ...)
#else
-/*
+/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
};
#ifdef AFS_NT40_ENV
struct rxkad_stats rxkad_stats; /* put this here for convenience */
-#endif
+#endif
#endif /* AFS_PTHREAD_ENV */
int timecounter;
static int calls = 0, ios = 0;
-struct buffer *newslot(afs_int32 *afid, afs_int32 apage,
+struct buffer *newslot(afs_int32 *afid, afs_int32 apage,
struct buffer *lp);
/* XXX - This sucks. The correct prototypes for these functions are ...
int
EnumerateDir(void *dir, int (*hookproc) (void *dir, char *name,
- afs_int32 vnode, afs_int32 unique),
+ afs_int32 vnode, afs_int32 unique),
void *hook)
{
/* Enumerate the contents of a directory.
static struct DirEntry *
FindFid (void *dir, afs_uint32 vnode, afs_uint32 unique)
{
- /* Find a directory entry, given the vnode and uniquifier of a object.
+ /* Find a directory entry, given the vnode and uniquifier of a object.
* This entry returns a pointer to a locked buffer. If no entry is found,
- * however, no items are left locked, and a null pointer is returned
- * instead.
+ * however, no items are left locked, and a null pointer is returned
+ * instead.
*/
int i;
struct DirHeader *dhp;
return 0;
}
while(tp) {
- if (vnode == ntohl(tp->fid.vnode)
- && unique == ntohl(tp->fid.vunique)) {
+ if (vnode == ntohl(tp->fid.vnode)
+ && unique == ntohl(tp->fid.vunique)) {
DRelease(dhp, 0);
return tp;
}
}
int
-InverseLookup (void *dir, afs_uint32 vnode, afs_uint32 unique, char *name,
+InverseLookup (void *dir, afs_uint32 vnode, afs_uint32 unique, char *name,
afs_uint32 length)
{
/* Look for the name pointing to given vnode and unique in a directory */
struct DirEntry *entry;
int code = 0;
-
+
entry = FindFid(dir, vnode, unique);
if (!entry)
return ENOENT;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-/* This is the directory salvager. It consists of two routines. The first,
- * DirOK, checks to see if the directory looks good. If the directory does
- * NOT look good, the approved procedure is to then call Salvage, which
- * copies all the good entries from the damaged dir into a new directory.
+/* This is the directory salvager. It consists of two routines. The first,
+ * DirOK, checks to see if the directory looks good. If the directory does
+ * NOT look good, the approved procedure is to then call Salvage, which
+ * copies all the good entries from the damaged dir into a new directory.
*/
#include <afsconfig.h>
AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
/* Defined in vol/physio.c */
extern void Die(char *);
-
+
#define printf Log /* To make it work with volume salvager */
-/* This routine is called with one parameter, the id (the same thing that is
- * passed to physio or the buffer package) of a directory to check. It
+/* This routine is called with one parameter, the id (the same thing that is
+ * passed to physio or the buffer package) of a directory to check. It
* returns 1 if the directory looks good, and 0 otherwise. */
#define MAXENAME 256
extern afs_int32 DErrno;
-/* figure out how many pages in use in a directory, given ptr to its (locked)
+/* figure out how many pages in use in a directory, given ptr to its (locked)
* header */
static int
ComputeUsedPages(struct DirHeader *dhp)
}
}
- /* Compute number of used directory pages and max entries in all
+ /* Compute number of used directory pages and max entries in all
** those pages, the value of 'up' must be less than pgcount. The above
** loop only checks the first MAXPAGES in a directory. An alloMap does
** not exists for pages between MAXPAGES and BIGMAXPAGES */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
if (syms == NULL)
sys_error("syms is NULL");
- fp = fopen(syms, "r");
+ fp = fopen(syms, "r");
if (fp == NULL)
sys_error(syms);
if (debug)
dump_ksym(kp, *strp);
}
-\f
+
/*
* find_suffix - look for a string that arg string is suffix of
*
return 0;
}
-\f
+
/*
* xsym_compar - compare two XCOFF symbol table entries
*
return compar;
}
-\f
+
/*
* dump_xsym - print to XCOFF symbol
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return err;
}
-\f
+
/*
* config - process configuration data
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIXNFS11
#define AUTH_DES 1
#endif
-/*
- * Wrapper for xdr_string that can be called directly from
+/*
+ * Wrapper for xdr_string that can be called directly from
* routines like clnt_call; from user-mode xdr package.
*/
#ifndef AFS_SUN5_ENV
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
OUT afs_uint32 *serverVersion,
OUT afs_uint32 *configCount,
OUT cacheConfig *config
-) = 218;
+) = 218;
proc GetCE64(
IN afs_int32 index,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
typedef afs_int32 ViceDataType;
%#define Invalid 0
-%#define File 1
-%#define Directory 2
-%#define SymbolicLink 3
+%#define File 1
+%#define Directory 2
+%#define SymbolicLink 3
%#ifdef KERNEL
%#define afs_xdr_array(a,b,c,d,e,f) afs_xdr_arrayN(a,b,c,d,e,f)
};
struct AFSStoreStatus {
- afs_uint32 Mask;
+ afs_uint32 Mask;
afs_uint32 ClientModTime;
afs_uint32 Owner;
afs_uint32 Group;
) = 151;
CheckToken(
- IN afs_int32 ViceId,
+ IN afs_int32 ViceId,
AFSOpaque *token
) = 152;
) = 65536;
FetchData64(
- IN AFSFid *Fid,
- afs_int64 Pos,
- afs_int64 Length,
- OUT AFSFetchStatus *OutStatus,
- AFSCallBack *CallBack,
+ IN AFSFid *Fid,
+ afs_int64 Pos,
+ afs_int64 Length,
+ OUT AFSFetchStatus *OutStatus,
+ AFSCallBack *CallBack,
AFSVolSync *Sync
) split = 65537;
StoreData64(
- IN AFSFid *Fid,
- AFSStoreStatus *InStatus,
- afs_uint64 Pos,
- afs_uint64 Length,
- afs_uint64 FileLength,
- OUT AFSFetchStatus *OutStatus,
+ IN AFSFid *Fid,
+ AFSStoreStatus *InStatus,
+ afs_uint64 Pos,
+ afs_uint64 Length,
+ afs_uint64 FileLength,
+ OUT AFSFetchStatus *OutStatus,
AFSVolSync *Sync
) split = 65538;
const STATS64_VERSION = 16;
typedef afs_uint64 ViceStatistics64<STATS64_VERSION>;
-/* the "version" is a number representing the number of
+/* the "version" is a number representing the number of
array elements to return, from 0 to N-1 */
GetStatistics64(
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2006, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
strcpy(curr_stats->Disk[i].Name, pname);
}
if (code == RXGEN_OPCODE) {
- code =
- AFSVolPartitionInfo(curr_conn->rxVolconn,
+ code =
+ AFSVolPartitionInfo(curr_conn->rxVolconn,
pname, &partition);
if (!code) {
curr_stats->Disk[i].BlocksAvailable =
*------------------------------------------------------------------------*/
int
-fsprobe_Init(int a_numServers, struct sockaddr_in *a_socketArray,
+fsprobe_Init(int a_numServers, struct sockaddr_in *a_socketArray,
int a_ProbeFreqInSecs, int (*a_ProbeHandler)(void),
int a_debug)
{ /*fsprobe_Init */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* rxcall : Ptr to Rx call on which this request came in.
*
* Returns:
- * RXGEN_OPCODE (always).
+ * RXGEN_OPCODE (always).
*
* Environment:
* Nothing interesting.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <string.h>
#include "fsprobe.h" /*Interface for fsprobe module */
#include <afs/afsutil.h>
-
+
/*------------------------------------------------------------------------
* FS_Handler
*
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
gtxframe_CtrlHCmd(void *aparam, void *arock)
{
struct gwin *awindow = (struct gwin *) aparam;
-
+
struct gtx_frame *tframe;
char *tp;
int pos;
gtxframe_RecursiveEndCmd(void *aparam, void *arock)
{
struct gwin *awindow = (struct gwin *) aparam;
-
+
struct gtx_frame *tframe;
tframe = awindow->w_frame;
gtxframe_RecursiveErrCmd(void *aparam, void *arock)
{
struct gwin *awindow = (struct gwin *) aparam;
-
+
struct gtx_frame *tframe;
tframe = awindow->w_frame;
gtxframe_SelfInsertCmd(void *aparam, void *rockparam)
{
struct gwin *awindow = (struct gwin *) aparam;
-
+
int arock = (intptr_t)rockparam;
-
+
struct gtx_frame *tframe;
int pos;
char *tp;
}
int
-gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
+gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
char *adefault, char *aresult, int aresultSize)
{
int code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Error value otherwise.
*/
-extern int gator_X11gwin_drawrectangle(struct gwin *,
+extern int gator_X11gwin_drawrectangle(struct gwin *,
struct gwin_rectparams *);
/*
* Summary:
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Error value otherwise.
*/
-extern int gator_cursesgwin_drawrectangle(struct gwin *,
+extern int gator_cursesgwin_drawrectangle(struct gwin *,
struct gwin_rectparams *);
/*
* Summary:
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Error value otherwise.
*/
-extern int gator_dumbgwin_drawrectangle(struct gwin *,
+extern int gator_dumbgwin_drawrectangle(struct gwin *,
struct gwin_rectparams *);
/*
* Summary:
extern int gator_dumbgwin_getchar(struct gwin *gwp);
/* get a character from a window */
-extern int gator_dumbgwin_getdimensions(struct gwin *,
+extern int gator_dumbgwin_getdimensions(struct gwin *,
struct gwin_sizeparams *);
extern int gator_dumbgwin_wait(struct gwin *gwp);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern int gtxframe_SetFrame(struct gwin *awin, struct gtx_frame *aframe);
extern struct gtx_frame *gtxframe_GetFrame(struct gwin *);
-extern int gtxframe_AddMenu(struct gtx_frame *aframe, char *alabel,
+extern int gtxframe_AddMenu(struct gtx_frame *aframe, char *alabel,
char *astring);
extern int gtxframe_DeleteMenu(struct gtx_frame *aframe, char *alabel);
extern int gtxframe_ClearMenus(struct gtx_frame *aframe);
-extern int gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
- char *adefault, char *aresult,
+extern int gtxframe_AskForString(struct gtx_frame *aframe, char *aprompt,
+ char *adefault, char *aresult,
int aresultSize);
extern int gtxframe_DisplayString(struct gtx_frame *, char *);
extern int gtxframe_ClearMessageLine(struct gtx_frame *aframe);
extern int gtxframe_Delete(struct gtx_frame *aframe);
extern int gtxframe_Display(struct gtx_frame *aframe, struct gwin *awm);
extern int gtxframe_AddToList(struct gtx_frame *aframe, struct onode *aobj);
-extern int gtxframe_RemoveFromList(struct gtx_frame *aframe,
+extern int gtxframe_RemoveFromList(struct gtx_frame *aframe,
struct onode *aobj);
extern int gtxframe_ClearList(struct gtx_frame *aframe);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
struct gwin * awin = (struct gwin *) param1;
afs_int32 arock = (intptr_t)param2;
-
+
struct gtx_frame *tf;
afs_int32 code;
{
struct gwin *awin = (struct gwin *) param1;
afs_int32 arock = (intptr_t)param2;
-
+
struct gtx_frame *tf;
afs_int32 code;
NoCallCmd(void *param, void *unused)
{
struct gwin *awin = (struct gwin *)param;
-
+
gtxframe_DisplayString(awin->w_frame,
"Function should be mapped on '$d', not 'd'");
return 0;
StupidCmd(void *param, void *unused)
{
struct gwin *awin = (struct gwin *)param;
-
+
gtxframe_DisplayString(awin->w_frame,
"You're already showing that frame!");
return 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int (*gw_clear) (struct gwin *); /* Clear out a window */
int (*gw_destroy) (struct gwin *); /* Destroy a window */
int (*gw_display) (struct gwin *); /* [Re]display a window */
- int (*gw_drawline) (struct gwin *, struct gwin_lineparams *);
+ int (*gw_drawline) (struct gwin *, struct gwin_lineparams *);
/* Draw a line between two points */
- int (*gw_drawrectangle) (struct gwin *, struct gwin_rectparams *);
+ int (*gw_drawrectangle) (struct gwin *, struct gwin_rectparams *);
/* Draw a rectangle at the given loc & dimensions */
- int (*gw_drawchar) (struct gwin *, struct gwin_charparams *);
+ int (*gw_drawchar) (struct gwin *, struct gwin_charparams *);
/* Draw a char at the given location */
- int (*gw_drawstring) (struct gwin *, struct gwin_strparams *);
+ int (*gw_drawstring) (struct gwin *, struct gwin_strparams *);
/* Draw a char string at the given location */
- int (*gw_invert) (struct gwin *, struct gwin_invparams *);
+ int (*gw_invert) (struct gwin *, struct gwin_invparams *);
/* Invert region */
int (*gw_getchar) (struct gwin *); /* Get a character from a window */
- int (*gw_getdimensions) (struct gwin *, struct gwin_sizeparams *);
+ int (*gw_getdimensions) (struct gwin *, struct gwin_sizeparams *);
/* Get dimensions of a window */
int (*gw_wait) (struct gwin *); /* Wait for input */
};
* Base operations on the lower-level window system.
*/
struct gwinbaseops {
- struct gwin *(*gw_createwin) (void *);
+ struct gwin *(*gw_createwin) (void *);
/*Create a window */
int (*gw_cleanup) (struct gwin *); /*Clean up before program exit */
};
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
gtx_InputServer(void *param)
{
struct gwin *awin = (struct gwin *) param;
-
+
int tc;
int code;
struct gtx_frame *tframe;
}
struct gwin *
-gtx_Init(int astartInput,
+gtx_Init(int astartInput,
int atype) /* type of window to create */
{
PROCESS junk;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
int
-keymap_BindToString(struct keymap_map *amap, char *astring,
- int (*aproc)(void *, void *),
+keymap_BindToString(struct keymap_map *amap, char *astring,
+ int (*aproc)(void *, void *),
char *aname, void *arock)
{
char *cptr;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
static char mn[] = "gator_objects"; /*Module name */
int objects_debug; /*Is debugging output on? */
-int (*on_create[GATOR_NUM_OBJTYPES]) (struct onode *,
+int (*on_create[GATOR_NUM_OBJTYPES]) (struct onode *,
struct onode_createparams *);
/*Array of ptrs to creation functions */
* THIS PACKAGE ***
*
* Side Effects:
- *
+ *
*--------------------------------------------------------------------------------*/
int
* gator_objects_lookup
*
* Description:
- *
+ *
*
* Arguments:
* char *onode_name: Onode string name to find.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*------------------------------------------------------------------------*/
int
-gator_textcb_BlankLine(struct gator_textcb_hdr *a_cbhdr,
+gator_textcb_BlankLine(struct gator_textcb_hdr *a_cbhdr,
int a_numBlanks)
{ /*gator_textcb_BlankLine */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*------------------------------------------------------------------------*/
int
-gator_text_Write(struct onode *onp, char *strToWrite, int numChars,
+gator_text_Write(struct onode *onp, char *strToWrite, int numChars,
int highlight, int skip)
{ /*gator_text_Write */
int bumpAmount; /*Amount to bump count */
/*
- *
+ *
*/
if (objects_debug) {
fprintf(stderr,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
printf("Hash table utilization = %f%%\n",
(double)dynamics.hashTableUtilization / 100.0);
ka_timestr(dynamics.start_time, bob, KA_TIMESTR_LEN);
- printf("From host %lx started at %s:\n",
+ printf("From host %lx started at %s:\n",
afs_printable_uint32_lu(dynamics.host), bob);
#define print_stat(name) if (dynamics.name.requests) printf (" of %d requests for %s, %d were aborted.\n", dynamics.name.requests, # name, dynamics.name.aborts)
timeOffset, now - start);
}
ka_timestr(info.startTime, bob, KA_TIMESTR_LEN);
- printf("From host %lx started %sat %s:\n",
+ printf("From host %lx started %sat %s:\n",
afs_printable_uint32_lu(info.host),
(info.noAuth ? "w/o authorization " : ""), bob);
ka_timestr(info.lastTrans, bob, KA_TIMESTR_LEN);
printf("Next autoCPW at %s or in %d updates.\n", bob,
info.updatesRemaining);
if (info.cheader_lock || info.keycache_lock)
- printf("locks: cheader %08lx, keycache %08lx\n",
+ printf("locks: cheader %08lx, keycache %08lx\n",
afs_printable_uint32_lu(info.cheader_lock),
afs_printable_uint32_lu(info.keycache_lock));
printf("Last authentication for %s, last admin user was %s\n",
return 0;
/* Determine if we need to destory the ubik connection.
- * Closing it avoids resends of packets.
+ * Closing it avoids resends of packets.
*/
if (conn) {
ubik_ClientDestroy(conn);
ts = cmd_CreateSyntax("noauthentication", NoAuth, NULL,
"connect to AuthServer w/o using token");
- ts = cmd_CreateSyntax("list", ListUsers, NULL,
+ ts = cmd_CreateSyntax("list", ListUsers, NULL,
"list all users in database");
cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
"show detailed info about each user");
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
-/*
+/*
* The read and write routines take as a parameter, the offset into
* the main database at which a particular user's entry resides. They
* then convert that into an offset into the auxiliary database. This
* detail.
*/
int
-kaux_read(afs_int32 to, /* this is the offset of the user id in the main database.
+kaux_read(afs_int32 to, /* this is the offset of the user id in the main database.
* we do the conversion here - probably a bad idea. */
unsigned int *nfailures, afs_uint32 * lasttime)
{
if (offset > lseek(fd, offset, SEEK_SET))
return 0;
- /* we should just end up with 0 for nfailures and lasttime if EOF is
+ /* we should just end up with 0 for nfailures and lasttime if EOF is
* encountered here, I hope */
if ((0 > read(fd, nfailures, sizeof(int)))
|| (0 > read(fd, lasttime, sizeof(afs_int32)))) {
}
-/*
+/*
* report on whether a particular id is locked or not...
* has to get some dirt from ubik.
* We multiply the actual number of permitted attempts by two because
* with the ka_string_to_key, and once with des_string_to_key, for
* Kerberos compatibility. It's easier to frob here than to explain
* to users/admins.
- * RETURNS: time when the ID will be unlocked, or 0 if it's not locked.
+ * RETURNS: time when the ID will be unlocked, or 0 if it's not locked.
*/
int
kaux_islocked(afs_int32 to, u_int attempts, u_int locktime)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
returned. */
afs_int32
-FindBlock(struct ubik_trans *at, char *aname, char *ainstance, afs_int32 *toP,
+FindBlock(struct ubik_trans *at, char *aname, char *ainstance, afs_int32 *toP,
struct kaentry *tentry)
{
afs_int32 i, code;
returns zero if there were no errors. */
afs_int32
-ThreadBlock(struct ubik_trans *at, afs_int32 index,
+ThreadBlock(struct ubik_trans *at, afs_int32 index,
struct kaentry *tentry)
{
int code;
remaining count is negative. */
afs_int32
-NextBlock(struct ubik_trans *at, afs_int32 index, struct kaentry *tentry,
+NextBlock(struct ubik_trans *at, afs_int32 index, struct kaentry *tentry,
afs_int32 *remaining)
{
int code;
and pointer to the user entry. */
afs_int32
-ka_NewKey(struct ubik_trans *tt, afs_int32 tentryaddr,
+ka_NewKey(struct ubik_trans *tt, afs_int32 tentryaddr,
struct kaentry *tentry, struct ktc_encryptionKey *key)
{
struct kaOldKeys okeys; /* old keys block */
}
afs_int32
-ka_DelKey(struct ubik_trans *tt, afs_int32 tentryaddr,
+ka_DelKey(struct ubik_trans *tt, afs_int32 tentryaddr,
struct kaentry *tentry)
{
int code;
/* Add a key to the key cache, expanding it if necessary. */
void
-ka_Encache(char *name, char *inst, afs_int32 kvno,
+ka_Encache(char *name, char *inst, afs_int32 kvno,
struct ktc_encryptionKey *key, Date superseded)
{
int i;
with tt==0, since Rx can't call Ubik. */
afs_int32
-ka_LookupKvno(struct ubik_trans *tt, char *name, char *inst, afs_int32 kvno,
+ka_LookupKvno(struct ubik_trans *tt, char *name, char *inst, afs_int32 kvno,
struct ktc_encryptionKey *key)
{
int i;
/* Look up the primary key and key version for a principal. */
afs_int32
-ka_LookupKey(struct ubik_trans *tt,
- char *name,
- char *inst,
+ka_LookupKey(struct ubik_trans *tt,
+ char *name,
+ char *inst,
afs_int32 *kvno, /* returned */
struct ktc_encryptionKey *key) /* copied out */
{
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Revision 1.5 88/11/18 09:17:53
* This is now obsolete, opcodes are defined in kauth.rg, no opcode names
* are used.
- *
+ *
* Revision 1.4 88/09/20 11:37:36
* Added IBM Copyright
- *
+ *
* Revision 1.3 88/08/29 12:46:27
* This checks in several new modules and many updates. The AuthServer
* at this point works more or less as described in the NAFS document
* Tickets are as described in the kerberos.ticket file.
* Intergrated w/ MIT's des implementation and the Andrew one-way password
* encryption. Uses bcrypt for RSECURE connections. Uses R not Rx.
- *
+ *
* Revision 1.2 88/07/19 16:19:58
* Added GetEntry and ListEntry; other internal changes.
* */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
- * some macros to permit a couple of new features while remaining compatible
+ * some macros to permit a couple of new features while remaining compatible
* and reasonably portable...
- * could tighten up 0 and 3 a little, but I've left them like this for now
+ * could tighten up 0 and 3 a little, but I've left them like this for now
* for ease of understanding.
* assumes sizeof(afs_int32) == 4, but then, so does the rest of AFS...
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
static afs_int32 autoCPWInterval;
static afs_int32 autoCPWUpdates;
-static afs_int32 set_password(struct ubik_trans *tt, char *name,
+static afs_int32 set_password(struct ubik_trans *tt, char *name,
char *instance,
struct ktc_encryptionKey *password,
afs_int32 kvno, afs_int32 caller);
-static afs_int32 impose_reuse_limits(EncryptionKey *password,
+static afs_int32 impose_reuse_limits(EncryptionKey *password,
struct kaentry *tentry);
static int create_user(struct ubik_trans *tt, char *name, char *instance,
struct ktc_encryptionKey *key, afs_int32 caller,
afs_int32
-kamCreateUser(struct rx_call *call, char *aname, char *ainstance,
+kamCreateUser(struct rx_call *call, char *aname, char *ainstance,
EncryptionKey ainitpw)
{
int code;
}
afs_int32
-ChangePassWord(struct rx_call *call, char *aname, char *ainstance,
+ChangePassWord(struct rx_call *call, char *aname, char *ainstance,
ka_CBS *arequest, ka_BBS *oanswer)
{
int code;
static afs_int32
-set_password(struct ubik_trans *tt, char *name, char *instance,
+set_password(struct ubik_trans *tt, char *name, char *instance,
struct ktc_encryptionKey *password, afs_int32 kvno, afs_int32 caller)
{
afs_int32 code;
static afs_int32
PrepareTicketAnswer(ka_BBS *oanswer, afs_int32 challenge, char *ticket,
afs_int32 ticketLen, struct ktc_encryptionKey *sessionKey,
- Date start, Date end, struct kaentry *caller,
+ Date start, Date end, struct kaentry *caller,
struct kaentry *server, char *cell, char *label)
{
afs_int32 code;
is normally disabled for these two principals. */
static afs_int32
-Authenticate(int version, struct rx_call *call, char *aname, char *ainstance,
+Authenticate(int version, struct rx_call *call, char *aname, char *ainstance,
Date start, Date end, ka_CBS *arequest, ka_BBS *oanswer)
{
int code;
}
#ifdef LOCKPW
/* have to check for locked before verifying the password, otherwise all
- * KALOCKED means is "yup, you guessed the password all right, now wait a
+ * KALOCKED means is "yup, you guessed the password all right, now wait a
* few minutes and we'll let you in"
*/
if (kaux_islocked
afs_int32
SKAA_Authenticate_old(struct rx_call *call, char *aname, char *ainstance,
- Date start, Date end, ka_CBS *arequest,
+ Date start, Date end, ka_CBS *arequest,
ka_BBS *oanswer)
{
int code;
}
afs_int32
-SKAA_Authenticate(struct rx_call *call, char *aname, char *ainstance,
+SKAA_Authenticate(struct rx_call *call, char *aname, char *ainstance,
Date start, Date end, ka_CBS *arequest, ka_BBS *oanswer)
{
int code;
}
afs_int32
-SKAA_AuthenticateV2(struct rx_call *call, char *aname, char *ainstance,
+SKAA_AuthenticateV2(struct rx_call *call, char *aname, char *ainstance,
Date start, Date end, ka_CBS *arequest, ka_BBS *oanswer)
{
int code;
tentry.max_ticket_lifetime = htonl(alifetime);
#ifndef NOPWCONTROLS
- /*
+ /*
* We've packed a bunch of bytes into a long for backward compatibility.
* These include password expiration time, and some failed login limits
* counters. Now let's unpack them and stick them into the
* kaentry struct. All the bytes have values in the range
* 1..255, else they were not specified in the interface, and are
- * set to zero.
+ * set to zero.
* In the case of password expiration times, 1 means password never
* expires (==>0), 2 means password only lives for one day (==>1),
* and so on.
temp = pack_long(tentry.misc_auth_bytes);
aentry->misc_auth_bytes = temp;
- /*
+ /*
* only return user's key if security disabled or if admin and
* we have an encrypted connection to the user
*/
}
afs_int32
-SKAM_GetStats(struct rx_call *call, afs_int32 version,
+SKAM_GetStats(struct rx_call *call, afs_int32 version,
afs_int32 *admin_accounts, kasstats *statics,
kadstats *dynamics)
{
}
afs_int32
-kamGetStats(struct rx_call *call, afs_int32 version,
+kamGetStats(struct rx_call *call, afs_int32 version,
afs_int32 *admin_accounts, kasstats *statics,
kadstats *dynamics)
{
return 0;
}
-/* these are auxiliary routines. They don't do any Ubik stuff. They use
+/* these are auxiliary routines. They don't do any Ubik stuff. They use
* a tacked-on-the-side data file.
* prob'ly ought to check the noauth flag.
*/
SKAM_Unlock(struct rx_call *call,
char *aname,
char *ainstance,
- afs_int32 spare1,
- afs_int32 spare2,
- afs_int32 spare3,
+ afs_int32 spare1,
+ afs_int32 spare2,
+ afs_int32 spare3,
afs_int32 spare4)
{
int code;
char *aname,
char *ainstance,
afs_int32 *lockeduntil,
- afs_int32 spare1,
- afs_int32 spare2,
- afs_int32 spare3,
+ afs_int32 spare1,
+ afs_int32 spare2,
+ afs_int32 spare3,
afs_int32 spare4)
{
int code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
printf("Invalid audit interface '%s'\n", interface);
exit(1);
}
-
+
} else if (strcmp(arg, "-localfiles") == 0)
lclpath = argv[++a];
else if (strcmp(arg, "-servers") == 0)
#else
/* NT & HPUX do not have dbm package support. So we can only do some
* text logging. So open the AuthLog file for logging and redirect
- * stdin and stdout to it
+ * stdin and stdout to it
*/
OpenLog(AFSDIR_SERVER_KALOG_FILEPATH);
SetupLogSignals();
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
rx_SetNoJumbo();
tservice =
- rx_NewServiceHost(host, 0, KA_AUTHENTICATION_SERVICE,
+ rx_NewServiceHost(host, 0, KA_AUTHENTICATION_SERVICE,
"AuthenticationService", sca, 1, KAA_ExecuteRequest);
if (tservice == (struct rx_service *)0) {
ViceLog(0, ("Could not create Authentication rx service\n"));
rx_SetMinProcs(tservice, 1);
rx_SetMaxProcs(tservice, 1);
-
+
tservice =
rx_NewServiceHost(host, 0, KA_TICKET_GRANTING_SERVICE, "TicketGrantingService",
sca, 1, KAT_ExecuteRequest);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Revision 1.11 89/02/10 11:56:23
* Added union to kaentry structure which allows overloading several
* fields depending on which type of user it is.
- *
+ *
* Revision 1.10 89/02/02 14:24:22
* Removed calls to gethostid() which doesn't return IP address on Suns.
- *
+ *
* Revision 1.9 88/12/22 14:43:48
* COUNT_REQ remembers name of last operation.
- *
+ *
* Revision 1.8 88/12/09 14:42:00
- * Greatly improved the external key version number management code.
+ * Greatly improved the external key version number management code.
* Added new entry type called kaOldKeys.
- *
+ *
* Revision 1.7 88/11/22 09:30:40
* Change RPC statistics to be more robust.
- *
+ *
* Revision 1.6 88/11/18 09:21:09
* Conversion to Rx and the new RxGen.
* Key version number is now a long.
* Conversion to use of <afs/auth.h> include file.
* Changed macros for statistics code since opcode hacking was punted.
- *
+ *
* Revision 1.5 88/10/12 16:26:34
* Added much better (working) support of key version number maintenance.
- *
+ *
* Revision 1.4 88/09/20 11:53:12
* Added IBM Copyright
- *
+ *
* Revision 1.3 88/08/29 12:46:39
* This checks in several new modules and many updates. The AuthServer
* at this point works more or less as described in the NAFS document
* Tickets are as described in the kerberos.ticket file.
* Intergrated w/ MIT's des implementation and the Andrew one-way password
* encryption. Uses bcrypt for RSECURE connections. Uses R not Rx.
- *
+ *
* Revision 1.2 88/07/19 16:20:33
* Added GetEntry and ListEntry; other internal changes.
* */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
%#define Date afs_uint32
%#endif
#define Date afs_uint32
-/* We log to AuthLog and a dbm-based log file on most platforms.
+/* We log to AuthLog and a dbm-based log file on most platforms.
* On NT & some HPs we only log to AuthLog
- * For HPs, AUTH_DBM_LOG is defined in their respective Makefiles for
+ * For HPs, AUTH_DBM_LOG is defined in their respective Makefiles for
* platforms that can log using dbm.
* On Linux, dbm is not part of the standard installation, and we can't
* statically link it in. So, ignore it for now.
/* kadatabase.c */
extern void init_kadatabase(int initFlags);
-extern afs_int32 ka_LookupKey(struct ubik_trans *tt,
- char *name, char *inst,
+extern afs_int32 ka_LookupKey(struct ubik_trans *tt,
+ char *name, char *inst,
afs_int32 *kvno,
struct ktc_encryptionKey *key);
struct kaentry;
-extern afs_int32 FindBlock(struct ubik_trans *at, char *aname,
- char *ainstance, afs_int32 *toP,
+extern afs_int32 FindBlock(struct ubik_trans *at, char *aname,
+ char *ainstance, afs_int32 *toP,
struct kaentry *tentry);
-extern afs_int32 ThreadBlock(struct ubik_trans *at, afs_int32 index,
+extern afs_int32 ThreadBlock(struct ubik_trans *at, afs_int32 index,
struct kaentry *tentry);
extern afs_int32 ka_FillKeyCache(struct ubik_trans *tt);
extern afs_int32 AllocBlock(struct ubik_trans *at, struct kaentry *tentry);
-extern afs_int32 ka_NewKey(struct ubik_trans *tt, afs_int32 tentryaddr,
+extern afs_int32 ka_NewKey(struct ubik_trans *tt, afs_int32 tentryaddr,
struct kaentry *tentry,
struct ktc_encryptionKey *key);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (! as->parms[3].items) {
char *hostName;
hostName = hostutil_GetNameByINet(rdata.host);
- printf("%s: last operation from host %s at %s",
- (char *)key.dptr, hostName,
+ printf("%s: last operation from host %s at %s",
+ (char *)key.dptr, hostName,
ctime(&rdata.last_use));
} else {
char *hostIP;
char hoststr[16];
hostIP = afs_inet_ntoa_r(rdata.host, hoststr);
- printf("%s: last operation from host %s at %s",
- (char *)key.dptr, hostIP,
+ printf("%s: last operation from host %s at %s",
+ (char *)key.dptr, hostIP,
ctime(&rdata.last_use));
}
} else {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int link_chars_read;
char *last_component;
if (lstat(orig_name, &statbuff) < 0) {
- /* if lstat fails, it's possible that it's transient, but
+ /* if lstat fails, it's possible that it's transient, but
* unlikely. Let's hope it isn't, and continue... */
*true_name = '\0';
return 0;
* if it exists, it must be us, eh?
* NB there may be possible security implications involving
* symlinks; I think they are only relevant if the symlink points
- * directly at kpasswd, not when it points at kpasswd's parent directory.
+ * directly at kpasswd, not when it points at kpasswd's parent directory.
*/
static int
find_me(char *arg, char *parent_dir)
* there's not much point in being more secure than the kpasswd executable.
*/
/* 1. is this directory in AFS?
- * 2. Is every component of the pathname secure
- * (ie, only system:administrators have w or a rights)?
+ * 2. Is every component of the pathname secure
+ * (ie, only system:administrators have w or a rights)?
*/
static int
is_secure(char *dir)
#ifndef INSECURE
for (temp = safestrtok(dir, "/"); temp; temp = safestrtok(NULL, "/")) {
- /* strtok keeps sticking NUL in place of /, so we can look at
+ /* strtok keeps sticking NUL in place of /, so we can look at
* ever-longer chunks of the path.
*/
if (!InAFS(dir))
}
/* Then, once we've found our own location, we look for a program named
- * kpwvalid.
+ * kpwvalid.
*/
/* look for a password-checking program named kpwvalid.
strcpy(dir + len, "/kpwvalid");
if (stat(dir, &statbuff) < 0) {
- /* if lstat fails, it's possible that it's transient, but
+ /* if lstat fails, it's possible that it's transient, but
* unlikely. Let's hope it isn't, and continue... */
*(dir + len) = '\0';
return 0;
#ifdef AFS_NT40_ENV
/* We don't allow the use of kpwvalid executable scripts to set policy
- * for passwd changes.
+ * for passwd changes.
*/
int
init_child(char *myname)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return code;
/* Use the KRBTKFILE environment variable if it exists, otherwise fall
- * back upon /tmp/tkt(uid}.
+ * back upon /tmp/tkt(uid}.
*/
if ((tf_name = (char *)getenv("KRBTKFILE")))
(void)sprintf(ticket_file, "%s", tf_name);
#endif /* AFSLITTLE_ENDIAN */
close(fd);
return 0;
-
-
+
+
bad:
close(fd);
return -1;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return code;
}
-/*
+/*
* Requires that you already possess a TGT.
*/
afs_int32
#endif
afs_int32
-ka_UserAuthenticateGeneral(afs_int32 flags, char *name, char *instance,
- char *realm, char *password, Date lifetime,
+ka_UserAuthenticateGeneral(afs_int32 flags, char *name, char *instance,
+ char *realm, char *password, Date lifetime,
afs_int32 * password_expires, /* days 'til, or don't change if not set */
afs_int32 spare2, char **reasonP)
{
ka_StringToKey(password, realm, &key);
-/*
+/*
* alarm is set by klogin and kpasswd only so ignore for
* NT
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* krb_get_in_tkt()
*
- * This code is descended from kerberos files krb_get_in_tkt.c and
+ * This code is descended from kerberos files krb_get_in_tkt.c and
* send_to_kdc.c, and one.c.
*/
*/
/*
- * Check_response is a support routine for krb_get_in_tkt.
+ * Check_response is a support routine for krb_get_in_tkt.
*
* Check the response with the supplied key. If the key is apparently
* wrong, return INTK_BADPW, otherwise zero.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
const struct acl_accessEntry *a = (struct acl_accessEntry *) arg1;
const struct acl_accessEntry *b = (struct acl_accessEntry *) arg2;
-
+
if (a->id > b->id)
return (-1);
if (a->id == b->id)
struct freeListEntry *e;
t = 20 + (nEntries) * (PR_MAXNAMELEN + 20);
- /* Conservative estimate: enough space in each entry for longest
+ /* Conservative estimate: enough space in each entry for longest
* name plus decimal 2**32 (for largest rights mask) plus some formatting */
if (GetFromList(&freeList, &e, t)) {
int
acl_Externalize_pr(int (*func)(idlist *ids, namelist *names), struct acl_accessList *acl, char **elist)
{
- /* Converts the access list defined by acl into the external access list
- * in elist. Non-translatable id's are converted to their ASCII string
- * representations. Returns 0 on success, -1 if number of entries
- * exceeds ACL_MAXENTRIES, or a failure code from the protection server
+ /* Converts the access list defined by acl into the external access list
+ * in elist. Non-translatable id's are converted to their ASCII string
+ * representations. Returns 0 on success, -1 if number of entries
+ * exceeds ACL_MAXENTRIES, or a failure code from the protection server
* if the problem occured there. */
int i;
int
acl_Internalize_pr(int (*func)(namelist *names, idlist *ids), char *elist, struct acl_accessList **acl)
{
- /* Converts the external access list elist into the access list acl.
- * Returns 0 on success, -1 if ANY name is not translatable, or if
+ /* Converts the external access list elist into the access list acl.
+ * Returns 0 on success, -1 if ANY name is not translatable, or if
* the number of entries exceeds al_maxExtEntries. */
int i;
int j;
}
static int
-GetFromList(struct freeListEntry **pflist, struct freeListEntry **elem,
+GetFromList(struct freeListEntry **pflist, struct freeListEntry **elem,
afs_int32 minsize)
{
- /* Looks for an element whose body is at least minsize bytes in the
- * freelist flist. If found, unlinks it, puts its address in elem,
- * and returns 0, else returns -1. A trivial first-fit algorithm is
+ /* Looks for an element whose body is at least minsize bytes in the
+ * freelist flist. If found, unlinks it, puts its address in elem,
+ * and returns 0, else returns -1. A trivial first-fit algorithm is
* used. */
struct freeListEntry *y, *z;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int pts_valid;
int vos_valid;
int vos_new;
- /* need to add server lists with TTL
- * so we don't pound the dns servers constantly
+ /* need to add server lists with TTL
+ * so we don't pound the dns servers constantly
* when generating the iterators
*/
void *server_list;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int (*rpc) (struct rx_connection *,
afs_uint32, afs_uint32 *,
afs_uint32 *, afs_uint32 *,
- afs_uint32 *,
- struct rpcStats *),
+ afs_uint32 *,
+ struct rpcStats *),
void **iterationIdP,
afs_status_p st);
afs_status_p st);
extern int ADMINAPI util_RPCStatsStateEnable(struct rx_connection *conn,
- int (*rpc) (struct rx_connection *),
+ int (*rpc) (struct rx_connection *),
afs_status_p st);
extern int ADMINAPI util_RPCStatsStateDisable(struct rx_connection *conn,
- int (*rpc) (struct rx_connection *),
+ int (*rpc) (struct rx_connection *),
afs_status_p st);
extern int ADMINAPI util_RPCStatsClear(struct rx_connection *conn,
- int (*rpc) (struct rx_connection *,
+ int (*rpc) (struct rx_connection *,
afs_RPCStatsClearFlag_t),
afs_RPCStatsClearFlag_t flag,
afs_status_p st);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
const void *serverHandle,
unsigned int partition,
unsigned int volumeId,
- afs_status_p st);
+ afs_status_p st);
#endif /* OPENAFS_VOS_ADMIN_H */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern int UV_ListOneVolume(struct rx_connection *server, afs_int32 a_partID,
afs_uint32 a_volID, struct volintInfo **a_resultPP,
afs_status_p st);
-
+
extern int UV_SyncVldb(afs_cell_handle_p cellHandle,
struct rx_connection *server, afs_int32 apart,
int flags, int force, afs_status_p st);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
static int SignalSignals(void);
-\f
+
/********************************\
* *
* Stuff for managing IoRequests *
static void *(*sigProc[NSOFTSIG])(void *);
static void *sigRock[NSOFTSIG];
-\f
+
static struct IoRequest *iorFreeList = 0;
static struct TM_Elem *Requests; /* List of requests */
int code);
static void SignalTimeout(int code, struct timeval *timeout);
-/* fd_set pool managment.
+/* fd_set pool managment.
* Use the pool instead of creating fd_set's on the stack. fd_set's can be
* 8K in size, so making three could put 24K in the limited space of an LWP
* stack.
#define Purge(list) FOR_ALL_ELTS(req, list, { free(req->BackPointer); })
-\f
+
/* FD_SET support routines. All assume the fd_set size is a multiple of an int
* so we can at least do logical operations on ints instead of chars.
*
#endif
}
-/* FDSetAnd - fd_set1 <- fd_set1 & fd_set2.
+/* FDSetAnd - fd_set1 <- fd_set1 & fd_set2.
*/
#ifdef AFS_NT40_ENV
static void FDSetAnd(int nfds, fd_set *fd_set1, fd_set *fd_set2)
if (fd_set1 == NULL || fd_set1->fd_count == 0)
return;
-
+
if (fd_set2 == NULL || fd_set2->fd_count == 0) {
FD_ZERO(fd_set1);
}
}
}
#endif
-
-/* FDSetEmpty - return true if fd_set is empty
+
+/* FDSetEmpty - return true if fd_set is empty
*/
static int FDSetEmpty(int nfds, fd_set *fds)
{
}
return (void *)-1; /* keeps compilers happy. */
}
-\f
+
/************************\
* *
* Signalling routines *
return;
})
}
-\f
+
/*****************************************************\
* *
* Signal handling routine (not to be confused with *
for (i=0; i < NSOFTSIG; i++) {
PROCESS pid;
if ((p=sigProc[i])) /* This yields!!! */
- LWP_CreateProcess2(p, stackSize, LWP_NORMAL_PRIORITY,
+ LWP_CreateProcess2(p, stackSize, LWP_NORMAL_PRIORITY,
sigRock[i], "SignalHandler", &pid);
sigProc[i] = 0;
}
return gotone;
}
-\f
+
/***************************\
* *
* User-callable routines *
anySigsDelivered = TRUE; /* A soft signal may have happened before
IOMGR_Initialize: so force a check for signals regardless */
- return LWP_CreateProcess(IOMGR, AFS_LWP_MINSTACKSIZE, 0, (void *) 0,
+ return LWP_CreateProcess(IOMGR, AFS_LWP_MINSTACKSIZE, 0, (void *) 0,
"IO MANAGER", &IOMGR_Id);
}
IOMGR_Id = NULL;
return status;
}
-\f
+
/* signal I/O for anyone who is waiting for a FD or a timeout; not too cheap,
* since forces select and timeofday check */
int IOMGR_Poll(void) {
if (fds < req->nfds)
fds = req->nfds;
})
-
+
tv.tv_sec = 0;
tv.tv_usec = 0;
#ifdef AFS_NT40_ENV
return 0;
}
-int IOMGR_Select(int fds, fd_set *readfds, fd_set *writefds,
+int IOMGR_Select(int fds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout)
{
struct IoRequest *request;
* can also get this error return
*/
if (code < 0 && errno == EAGAIN)
- goto again;
+ goto again;
#endif
#ifdef AFS_NT40_ENV
if (code == SOCKET_ERROR) {
FreeRequest(request);
return (result > 1 ? 1 : result);
}
-\f
+
int IOMGR_Cancel(PROCESS pid)
{
struct IoRequest *request;
return 0;
}
-\f
+
#ifndef AFS_NT40_ENV
/* Cause delivery of signal signo to result in a LWP_SignalProcess of
event. */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
assert(pthread_cond_destroy(&lock->write_cv) == 0);
#endif /* AFS_PTHRED_ENV */
}
-\f
+
void
Afs_Lock_Obtain(struct Lock *lock, int how)
{
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
; \
} while (0)
#endif
-\f
+
static void Dispatcher(void);
static void Create_Process_Part2(void);
static void Exit_LWP(void);
static void Abort_LWP(char *msg);
static void Overflow_Complain(void);
static void Initialize_PCB(PROCESS temp, int priority, char *stack,
- int stacksize, void *(*ep)(void *), void *parm,
+ int stacksize, void *(*ep)(void *), void *parm,
char *name);
static void Dispose_of_Dead_PCB(PROCESS cur);
static void Free_PCB(PROCESS pid);
static int Internal_Signal(void *event);
static int purge_dead_pcbs(void);
static int LWP_MwaitProcess(int wcount, void *evlist[]);
-
+
#define MAX_PRIORITIES (LWP_MAX_PRIORITY+1)
PROCESS head;
int count;
} runnable[MAX_PRIORITIES], blocked, qwaiting;
-/* Invariant for runnable queues: The head of each queue points to the
- * currently running process if it is in that queue, or it points to the
+/* Invariant for runnable queues: The head of each queue points to the
+ * currently running process if it is in that queue, or it points to the
* next process in that queue that should run. */
/* Offset of stack field within pcb -- used by stack checking stuff */
body\
}\
}
-\f
+
/* */
/*****************************************************************************\
* *
#ifdef AFS_AIX32_ENV
if (!stackptr) {
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*
/*
* First we need to increase the default resource limits,
* if necessary, so that we can guarantee that we have the
- * resources to create the core file, but we can't always
+ * resources to create the core file, but we can't always
* do it as an ordinary user.
*/
if (!geteuid()) {
return LWP_NO_STACK;
return LWP_SUCCESS;
}
-\f
+
/*
* The following functions are strictly
* INTERNAL to the LWP support package.
lwp_remove(pid,
(pid->blockflag || pid->status == WAITING
|| pid->status ==
- DESTROYED ? &blocked :
+ DESTROYED ? &blocked :
(pid->status == QWAITING) ? &qwaiting :
&runnable[pid->priority]));
LWPANCHOR.processcnt--;
lwp_cpptr = runnable[i].head;
returnto(&lwp_cpptr->context);
-
+
return; /* not reachable */
}
* LWP_SUCCESS Rock did not exist and a new one was used
* LWP_EBADROCK Rock already exists.
* LWP_ENOROCKS All rocks are in use.
- *
+ *
* From the above semantics, you can only set a rock value once. This is specifically
* to prevent multiple users of the LWP package from accidentally using the same Tag
* value and clobbering others. You can always use one level of indirection to obtain
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
char lwp_debug; /* ON = show LWP debugging trace */
-/*
+/*
* Under hpux, any stack size smaller than 16K seems prone to
* overflow problems.
*
extern int LWP_QSignal(PROCESS pid);
#endif
-extern afs_int32 savecontext(void (*ep)(void),
+extern afs_int32 savecontext(void (*ep)(void),
struct lwp_context *savearea, char *sp);
extern void returnto(struct lwp_context *savearea);
#ifdef AFS_LINUX24_ENV
-/* max time we are allowed to spend in a select call on Linux to avoid
+/* max time we are allowed to spend in a select call on Linux to avoid
lost signal issues */
#define IOMGR_MAXWAITTIME 60 /* seconds */
#else
* Copyright (c) 2000-2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* pid - return this process
* value:
* LWP_SUCCESS (else aborts)
- *
+ *
*/
int LWP_InitializeProcessSupport(int priority, PROCESS *pid)
Abort_LWP("Insufficient Storage to Initialize LWP PCB");
(void) memset((void*)pcb, 0, sizeof(*pcb));
pcb->fiber = ConvertThreadToFiber(pcb);
- if (pcb == NULL)
+ if (pcb == NULL)
Abort_LWP("Cannot convert main thread to LWP fiber");
lwp_init = (struct lwp_ctl *) malloc(sizeof(struct lwp_ctl));
Initialize_PCB(pcb, priority, 0, NULL, NULL,
- "Main Process [created by LWP]");
+ "Main Process [created by LWP]");
lwp_cpptr = pcb;
Debug(10, ("Init: Insert 0x%p into runnable at priority %d\n", pcb, priority))
insert(pcb, &runnable[priority]);
if ( ( value = getenv("AFS_LWP_STACK_SIZE")) == NULL )
- lwp_MinStackSize = AFS_LWP_MINSTACKSIZE;
+ lwp_MinStackSize = AFS_LWP_MINSTACKSIZE;
else
lwp_MinStackSize = (AFS_LWP_MINSTACKSIZE>atoi(value)?
AFS_LWP_MINSTACKSIZE : atoi(value));
-
+
*pid = pcb;
return LWP_SUCCESS;
*
* Arguments:
* funP - start function
- * stacksize - size of
+ * stacksize - size of
* priority - LWP priority
* argP - initial parameter for start function
* name - name of LWP
char *name, PROCESS *pid)
{
PROCESS pcb;
-
+
purge_dead_pcbs();
pcb = (PROCESS)malloc(sizeof(*pcb));
if (!lwp_init)
return LWP_EINIT;
-
+
if (lwp_cpptr != pid) {
Dispose_of_Dead_PCB(pid);
} else {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "lwp.h"
#include "preempt.h"
-#if defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int PRE_Block = 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
typedef __uint64_t jmp_buf_type;
#endif
#else
-#if defined(AFS_ALPHA_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
+#if defined(AFS_ALPHA_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
typedef long jmp_buf_type;
#else
typedef int jmp_buf_type;
#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
#if defined(AFS_SPARC64_LINUX24_ENV) || defined(AFS_SPARC_LINUX24_ENV)
-/* technically we should use POINTER_GUARD
+/* technically we should use POINTER_GUARD
* ( == offsetof (tcbhead_t, pointer_guard) )
* instead of 0x18
*/
#undef ptr_mangle
static int ptr_mangle(int p)
-{
+{
register char *tls_ptr __asm__("%g7");
return p ^ *(int*)(tls_ptr + 0x18);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
free(old);
return (s);
}
-\f
+
queue *q;
int asleep; /* Number of processes sleeping -- used for
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* t1 = t2 - t3 */
static void
-subtract(struct timeval *t1, struct timeval *t2,
+subtract(struct timeval *t1, struct timeval *t2,
struct timeval *t3)
{
int sec2, usec2, sec3, usec3;
t1->tv_usec -= MILLION;
}
}
-\f
+
/* t1 == t2 */
int
{
return (t->TotalTime.tv_sec < 0 || t->TotalTime.tv_usec < 0);
}
-\f
+
/*
next = tlistPtr;
openafs_insque(elem, next->Prev);
}
-\f
+
/*
Walks through the specified list and updates the TimeLeft fields in it.
Returns number of expired elements in the list.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* LWP_WaitForKeystroke - wait indefinitely or for a specified number of
* seconds for keyboard input.
*
- * If seconds < 0, LWP_WaitForKeystroke will wait indefinitely.
+ * If seconds < 0, LWP_WaitForKeystroke will wait indefinitely.
* If seconds == 0, LWP_WaitForKeystroke will just determine if data is now
* present.
* Otherwise, wait "seconds" for data.
* process run some*/
IOMGR_Select(0, 0, 0, 0, &twait);
- if (seconds > 0) { /* we only worry about elapsed time if
+ if (seconds > 0) { /* we only worry about elapsed time if
* not looping forever (seconds < 0) */
/* now check elapsed time */
time(&nowTime);
/* LWP_GetLine() - Waits indefinitely until a newline has been typed
* and then returns the line typed.
- *
+ *
* This is trivial in unix, but requires some processing on NT.
* we basically read all chars into a buffer until we hit a newline and
* then return it to the user.
#else
/* LWP_WaitForKeystroke(Unix) :Wait until a key has been struck or time (secconds)
* runs out and return to caller. The Unix version will actually wait until
- * a <cr> has been entered before returning.
+ * a <cr> has been entered before returning.
* Input:
* seconds: wait for <seconds> seconds before returning. If seconds < 0,
* wait infinitely.
int _size;
};
struct APPX_FILE
- {
+ {
struct __FILE_public pub;
struct appx_sbuf _bf; /* the buffer (at least 1 byte, if !NULL) */
};
/* LWP_GetLine() - Waits indefinitely until a newline has been typed
* and then returns the line typed.
- *
+ *
* This is trivial in unix, but requires some processing on NT.
* we basically read all chars into a buffer until we hit a newline and
* then return it to the user.
* Input:
* seconds - how long to wait for a key press.
* *key - char entered by user
- * Return Values:
+ * Return Values:
* 0 - Time ran out before the user typed a key.
* 1 - Valid char is being returned.
*/
#define CAS64O CAS64
/*
- * II. Memory barriers.
+ * II. Memory barriers.
* WMB(): All preceding write operations must commit before any later writes.
* RMB(): All preceding read operations must commit before any later reads.
* MB(): All preceding memory accesses must commit before any later accesses.
- *
+ *
* If the compiler does not observe these barriers (but any sane compiler
* will!), then VOLATILE should be defined as 'volatile'.
*/
/******************************************************************************
* bst_lock_fraser.c
- *
+ *
* Lock-free binary serach trees (BSTs), based on per-node spinlocks.
* Uses threaded tree presentation as described in my PhD dissertation:
* "Practical Lock-Freedom", University of Cambridge, 2003.
new->k = k;
new->v = v;
}
-
+
LOCK(p, qp, P_LOCKED);
-
+
if ( p->k < k )
{
if ( (p->r != n) || (UNTHREAD(n)->k < k) ) goto retry;
}
}
while ( (s != NULL) && (s->k != k) );
-
+
LOCK(f, qn);
if ( IS_BLUE(f) )
{
UNLOCK(a, pqn[0]);
UNLOCK(b, pqn[1]);
UNLOCK(c, &c_qn);
-
+
*pc = bp;
return cp;
}
retry:
f = find(&s->root, k, &f_qn, &dir);
-
+
if ( (w = FOLLOW(f, dir)) != NULL )
{
/* Protected by parent lock. */
if ( IS_GARBAGE(d) ) UNLOCK(d, &d_qn);
}
while ( IS_GARBAGE(d) );
-
+
LOCK(e, &e_qn);
if ( IS_GARBAGE(e) || !IS_REDUNDANT(e) ) goto out_de;
assert(!e->copy);
MK_GARBAGE(e);
-
+
if ( e->l != NULL ) e->l->p = d;
e->r->copy = 0;
int two_ago, three_ago, i, j;
ViceLog(11, ("GC: gc_reclaim enter\n"));
-
+
/* Barrier to entering the reclaim critical section. */
if ( gc_global.inreclaim || CASIO(&gc_global.inreclaim, 0, 1) ) return;
for ( i = 0; i < num_threads; i++ )
result->pt[i] = result;
-
+
result->length = length;
result->rc = 2;
}
/*
- * Copyright (c) 2008-2009
- * The Linux Box Corporation
- * ALL RIGHTS RESERVED
- *
- * Permission is granted to use, copy, create derivative works
- * and redistribute this software and such derivative works
- * for any purpose, so long as the name of the Linux Box
- * Corporation is not used in any advertising or publicity
- * pertaining to the use or distribution of this software
- * without specific, written prior authorization. If the
- * above copyright notice or any other identification of the
- * Linux Box Corporation is included in any copy of any
- * portion of this software, then the disclaimer below must
- * also be included.
- *
- * This software is provided as is, without representation
- * from the Linux Box Corporation as to its fitness for any
- * purpose, and without warranty by the Linux Box Corporation
- * of any kind, either express or implied, including
- * without limitation the implied warranties of
- * merchantability and fitness for a particular purpose. The
- * regents of the Linux Box Corporation shall not be liable
- * for any damages, including special, indirect, incidental, or
- * consequential damages, with respect to any claim arising
- * out of or in connection with the use of the software, even
- * if it has been or is hereafter advised of the possibility of
- * such damages.
+ * Copyright (c) 2008-2009
+ * The Linux Box Corporation
+ * ALL RIGHTS RESERVED
+ *
+ * Permission is granted to use, copy, create derivative works
+ * and redistribute this software and such derivative works
+ * for any purpose, so long as the name of the Linux Box
+ * Corporation is not used in any advertising or publicity
+ * pertaining to the use or distribution of this software
+ * without specific, written prior authorization. If the
+ * above copyright notice or any other identification of the
+ * Linux Box Corporation is included in any copy of any
+ * portion of this software, then the disclaimer below must
+ * also be included.
+ *
+ * This software is provided as is, without representation
+ * from the Linux Box Corporation as to its fitness for any
+ * purpose, and without warranty by the Linux Box Corporation
+ * of any kind, either express or implied, including
+ * without limitation the implied warranties of
+ * merchantability and fitness for a particular purpose. The
+ * regents of the Linux Box Corporation shall not be liable
+ * for any damages, including special, indirect, incidental, or
+ * consequential damages, with respect to any claim arising
+ * out of or in connection with the use of the software, even
+ * if it has been or is hereafter advised of the possibility of
+ * such damages.
*/
#ifndef OSI_MCAS_ATOMIC_H
#endif /* !INTEL */
-static int strong_vl(_u64 *ptr, int p)
+static int strong_vl(_u64 *ptr, int p)
{
_u64 val_read;
_u64 flag;
}
#if !defined(INTEL) && !defined(X86_64)
-static int strong_sc(_u64 *ptr, int p, _u32 n)
+static int strong_sc(_u64 *ptr, int p, _u32 n)
{
_u64 val_read;
_u64 new_val;
#endif /* !INTEL */
-static void s_store(_u64 *ptr, _u32 n)
+static void s_store(_u64 *ptr, _u32 n)
{
_u64 new_val;
*ptr = new_val;
}
-static _u32 s_load(_u64 *ptr)
+static _u32 s_load(_u64 *ptr)
{
_u64 val_read;
WMB_NEAR_CAS();
pred = FASPO(&lock->tail, qn);
-
+
if ( pred == NULL )
{
ADD_TO(lock->reader_count, 1);
/* Bounded to maximum # readers if no native atomic_decrement */
c = lock->reader_count;
while ( (oc = CASIO(&lock->reader_count, c, c-1)) != c ) c = oc;
-
+
if ( c == 1 )
{
WEAK_DEP_ORDER_MB();
qn->state = ST_NOSUCC | ST_BLOCKED;
WMB_NEAR_CAS();
-
+
pred = FASPO(&lock->tail, qn);
if ( pred == NULL )
break;
}
}
-
+
if ( ptst == NULL )
{
ptst = ALIGNED_ALLOC(sizeof(*ptst));
}
while ( (new_next = CASPO(&ptst_list, next, ptst)) != next );
}
-
+
pthread_setspecific(ptst_key, ptst);
}
gg = g->p;
wr_lock(&gg->lock, &gg_qn);
- if ( !ADJACENT(gg, g) || IS_UNBALANCED(gg->v) || IS_GARBAGE(gg) )
+ if ( !ADJACENT(gg, g) || IS_UNBALANCED(gg->v) || IS_GARBAGE(gg) )
goto unlock_gg;
wr_lock(&g->lock, &g_qn);
if ( !ADJACENT(p, x) || IS_UNBALANCED(p->v) ) goto unlock_pggg;
wr_lock(&x->lock, &x_qn);
-
+
assert(IS_RED(x->v));
assert(IS_UNBALANCED(x->v));
wr_unlock(&g->lock, &g_qn);
unlock_gg:
wr_unlock(&gg->lock, &gg_qn);
-
+
if ( done == 2 )
{
x = g;
}
assert(!IS_LEAF(w));
-
+
if ( x == p->l )
{
wn = w->l;
wr_unlock(&p->lock, &p_qn);
unlock_g:
wr_unlock(&g->lock, &g_qn);
-
+
if ( done == 2 )
{
x = p;
wr_lock(&g->lock, &g_qn);
if ( !ADJACENT(g, p) || IS_UNBALANCED(g->v) || IS_GARBAGE(g) )
goto unlock_g;
-
+
wr_lock(&p->lock, &p_qn);
/* Removing unbalanced red nodes is okay. */
if ( !ADJACENT(p, x) || (IS_UNBALANCED(p->v) && IS_BLACK(p->v)) )
if ( !ADJACENT(p, x) || IS_UNBALANCED(p->v) ) goto unlock_pggg;
mcs_lock(&x->lock, &x_qn);
-
+
assert(IS_RED(x->v));
assert(IS_UNBALANCED(x->v));
mcs_unlock(&g->lock, &g_qn);
unlock_gg:
mcs_unlock(&gg->lock, &gg_qn);
-
+
if ( done == 2 )
{
x = g;
}
assert(!IS_LEAF(w));
-
+
if ( x == p->l )
{
wn = w->l;
mcs_unlock(&p->lock, &p_qn);
unlock_g:
mcs_unlock(&g->lock, &g_qn);
-
+
if ( done == 2 )
{
x = p;
mcs_lock(&g->lock, &g_qn);
if ( !ADJACENT(g, p) || IS_UNBALANCED(g->v) || IS_GARBAGE(g) )
goto unlock_g;
-
+
mcs_lock(&p->lock, &p_qn);
/* Removing unbalanced red nodes is okay. */
if ( !ADJACENT(p, x) || (IS_UNBALANCED(p->v) && IS_BLACK(p->v)) )
z = &s->root;
while ( (y = (k <= z->k) ? z->l : z->r) != NULL )
z = y;
-
+
y = z->p;
mcs_lock(&y->lock, &y_qn);
if ( (((k <= y->k) ? y->l : y->r) != z) || IS_GARBAGE(y) )
while ( (x->p != &s->root) && IS_BLACK(x->v) )
{
p = x->p;
-
+
if ( x == p->l )
{
w = p->r;
/* Get new sibling W. */
w = p->r;
}
-
+
if ( IS_BLACK(w->l->v) && IS_BLACK(w->r->v) )
{
w->v = MK_RED(w->v);
/* Old w is new w->r. Old w->l is new w.*/
w = p->r;
}
-
+
w->v = SET_COLOUR(GET_VALUE(w->v), GET_COLOUR(p->v));
p->v = MK_BLACK(p->v);
w->r->v = MK_BLACK(w->r->v);
/* Get new sibling W. */
w = p->l;
}
-
+
if ( IS_BLACK(w->l->v) && IS_BLACK(w->r->v) )
{
w->v = MK_RED(w->v);
/* Old w is new w->l. Old w->r is new w.*/
w = p->l;
}
-
+
w->v = SET_COLOUR(GET_VALUE(w->v), GET_COLOUR(p->v));
p->v = MK_BLACK(p->v);
w->l->v = MK_BLACK(w->l->v);
x = y;
if ( k == x->k ) break;
}
-
+
if ( k == x->k )
{
ov = x->v;
{
pb = x->p;
p = write_stm_blk(ptst, tx, pb);
-
+
if ( xb == p->l )
{
wb = p->r;
wb = p->r;
w = write_stm_blk(ptst, tx, wb);
}
-
+
wrb = w->r;
wr = write_stm_blk(ptst, tx, wrb);
w->v = SET_COLOUR(GET_VALUE(w->v), GET_COLOUR(p->v));
wb = p->l;
w = write_stm_blk(ptst, tx, wb);
}
-
+
wlb = w->l;
wl = read_stm_blk(ptst, tx, wlb);
wrb = w->r;
wb = p->l;
w = write_stm_blk(ptst, tx, wb);
}
-
+
wlb = w->l;
wl = write_stm_blk(ptst, tx, wlb);
w->v = SET_COLOUR(GET_VALUE(w->v), GET_COLOUR(p->v));
new_stm_tx(tx, ptst, MEMORY);
ov = NULL;
b = s;
-
+
while ( b != NULLB )
{
zb = b;
}
b = (k < z->k) ? z->l : z->r;
}
-
+
if ( ov != NULL )
{
z = write_stm_blk(ptst, tx, zb);
new_stm_tx(tx, ptst, MEMORY);
v = NULL;
nb = s;
-
+
while ( nb != NULLB )
{
n = read_stm_blk(ptst, tx, nb);
int i;
log_t **sp = stack;
interval_t cutoff;
-
+
/* Construct cutoff heap. */
cutoff_heap[0] = (void *)nr_items;
for ( i = 0; i < nr_items; i++ )
if ( !do_op(&log[i], key_state) ) { i++; continue; }
*sp++ = &log[i];
-
+
/* Done? */
if ( (sp - stack) == nr_items ) goto success;
-
+
remove_entry(cutoff_heap, heap_offsets, log, &log[i]);
cutoff = cutoff_heap[1]->end;
i = 0;
}
-
+
/* Failure? */
if ( (sp - stack) == 0 )
{
fprintf(stderr, "Error opening log\n");
exit(-1);
}
-
+
/* Grok the log header. */
read(fd, log_header, sizeof(log_header));
nr_threads = log_header[0];
fprintf(stderr, "Error allocating space for log\n");
exit(-1);
}
-
+
/* Read log entries, and sort into key and timestamp order. */
read(fd, global_log, nr_threads*nr_updates*sizeof(log_t));
global_log[nr_threads*nr_updates].data = LOG_KEY_MASK; /* sentinel */
/******************************************************************************
* set_func.h
- *
+ *
* Matt Benjamin <matt@linuxbox.com>
*
* Adapts MCAS set interface to use a pointer-key and typed comparison
*
* Caution, pointer values 0x0, 0x01, and 0x02 are reserved. Fortunately,
* no real pointer is likely to have one of these values.
- *
+ *
*/
#ifndef __SET_ADT_H__
/*
* Add mapping (@k -> @v) into set @s. Return previous mapped value if
* one existed, or NULL if no previous mapping for @k existed.
- *
+ *
* If @overwrite is FALSE, then if a mapping already exists it is not
* modified, and the existing value is returned unchanged. It is possible
* to see if the value was changed by observing if the return value is NULL.
if ( j != num_threads )
{
- printf("Urk! Not enough CPUs for threads (%d < %d)\n",
+ printf("Urk! Not enough CPUs for threads (%d < %d)\n",
j, num_threads);
abort();
}
/******************************************************************************
* set_queue_adt.h
- *
+ *
* Matt Benjamin <matt@linuxbox.com>
*
* Adapts MCAS set interface to use a pointer-key and typed comparison
*
* Caution, pointer values 0x0, 0x01, and 0x02 are reserved. Fortunately,
* no real pointer is likely to have one of these values.
- *
+ *
Copyright (c) 2003, Keir Fraser All rights reserved.
/* Fine for 2^NUM_LEVELS nodes. */
#define NUM_LEVELS 20
-//#define NUM_LEVELS 19
+//#define NUM_LEVELS 19
/* Internal key values with special meanings. */
/*
* Add mapping (@k -> @v) into set @s. Return previous mapped value if
* one existed, or NULL if no previous mapping for @k existed.
- *
+ *
* If @overwrite is FALSE, then if a mapping already exists it is not
* modified, and the existing value is returned unchanged. It is possible
* to see if the value was changed by observing if the return value is NULL.
ptst = critical_enter();
succ = weak_search_predecessors(l, k, preds, succs);
-
+
retry:
ov = NULL;
/******************************************************************************
* skip_cas_adt.c
- *
- * Skip lists, allowing concurrent update by use of CAS primitives.
+ *
+ * Skip lists, allowing concurrent update by use of CAS primitives.
*
* Matt Benjamin <matt@linuxbox.com>
*
/******************************************************************************
* skip_cas_func.c
- *
- * Skip lists, allowing concurrent update by use of CAS primitives.
- *
+ *
+ * Skip lists, allowing concurrent update by use of CAS primitives.
+ *
* Matt Benjamin <matt@linuxbox.com>
*
* Adapts MCAS skip list to use a pointer-key and typed comparison
cd = new_descriptor(mcas_ptst, (level << 1) + 1);
cd->status = STATUS_IN_PROGRESS;
cd->length = (level << 1) + 1;
-
+
/* First, the deleted node's value field. */
READ_FIELD(v, x->v);
PROCESS(v, &x->v);
cd->entries[i+level+1].old = x;
cd->entries[i+level+1].new = x_next;
}
-
+
ret = mcas0(mcas_ptst, cd);
if ( ret == 0 ) v = NULL;
ov = NULL;
succ = search_predecessors(l, k, preds, succs);
-
+
if ( succ->k == k )
{
/* Already a @k node in the list: update its mapping. */
sh_node_pt preds[NUM_LEVELS], x;
k = CALLER_TO_INTERNAL_KEY(k);
-
+
ptst = critical_enter();
-
+
do {
x = search_predecessors(l, k, preds, NULL);
if ( x->k > k ) goto out;
{
gc_id[i] = gc_add_allocator(sizeof(node_t) + i*sizeof(node_t *));
}
-
+
}
int i;
k = CALLER_TO_INTERNAL_KEY(k);
-
+
ptst = critical_enter();
-
+
do {
new_stm_tx(tx, ptst, MEMORY);
x = search_predecessors(ptst, tx, l, k, bpreds, bsuccs);
/*
- * II. Memory barriers.
+ * II. Memory barriers.
* WMB(): All preceding write operations must commit before any later writes.
* RMB(): All preceding read operations must commit before any later reads.
* MB(): All preceding memory accesses must commit before any later accesses.
- *
+ *
* If the compiler does not observe these barriers (but any sane compiler
* will!), then VOLATILE should be defined as 'volatile'.
*/
/*
- * II. Memory barriers.
+ * II. Memory barriers.
* WMB(): All preceding write operations must commit before any later writes.
* RMB(): All preceding read operations must commit before any later reads.
* MB(): All preceding memory accesses must commit before any later accesses.
- *
+ *
* If the compiler does not observe these barriers (but any sane compiler
* will!), then VOLATILE should be defined as 'volatile'.
*/
{
data = CASPO(&ent->b->data, ent->old, marked_tx);
if ( (data == ent->old) || (data == marked_tx) ) break;
-
+
if ( !is_descriptor(data) ) goto fail;
-
+
other = ptr_to_descriptor(data);
rc_up_descriptor(other);
if ( ent->b->data != data )
rc_down_descriptor(ptst, other);
continue;
}
-
+
commit_stm_tx(ptst, other);
}
}
MB_NEAR_CAS();
}
else MB();
-
+
for ( ent = t->reads; ent != NULL; ent = ent->next )
{
for ( ; ; )
rc_down_descriptor(ptst, other);
continue;
}
-
+
/*
* What we do now depends on the status of the contending
* operation. This is easy for any status other than
old_status = new_status;
}
WMB_NEAR_CAS();
-
+
/*
* PHASE 3: CLEAN-UP.
*/
pent = search_stm_tx_entry(&t->writes, b);
ent = *pent;
if ( (ent != NULL) && (ent->b == b) )
- {
+ {
*pent = ent->next;
data = ent->new;
assert(!is_descriptor(data));
priv->cur_tx = NULL;
MB();
-
+
for ( ent = t->reads; ent != NULL; ent = ent->next )
{
if ( ent->b->loc != ent->l )
(st == TXS_SUCCESSFUL) ? ent->l->old : ent->l->new,
t->gc_data_id);
}
-
+
if ( t->dummy != NULL )
gc_unsafe_free(ptst, t->dummy, t->gc_data_id);
-
+
rc_down_descriptor(ptst, t);
return st == TXS_SUCCESSFUL;
gc_unsafe_free(ptst, ent->new, t->gc_data_id);
}
return FALSE;
- }
+ }
/*
* We put (hopefully rare) failure case out-of-line here.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
goto try_auth;
}
- /* pam_sm_authenticate should have set this
+ /* pam_sm_authenticate should have set this
* if (auth_ok && !got_authtok) {
* torch_password = 0;
* (void) pam_set_item(pamh, PAM_AUTHTOK, password);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return;
}
-/* The PAM module needs to be free from libucb dependency. Otherwise,
+/* The PAM module needs to be free from libucb dependency. Otherwise,
dynamic linking is a problem, the AFS PAM library refuses to coexist
with the DCE library. The sigvec() and sigsetmask() are the only two
calls that neccesiate the inclusion of libucb.a. There are used by
-the lwp library to support premeptive threads and signalling between
-threads. Since the lwp support used by the PAM module uses none of
+the lwp library to support premeptive threads and signalling between
+threads. Since the lwp support used by the PAM module uses none of
these facilities, we can safely define these to be null functions */
#if !defined(AFS_HPUX110_ENV)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
id = ntohl(e.id);
#if defined(SUPERGROUPS)
if ((id != ANONYMOUSID)
- && ((refCount = idcount(&misc->idmap, id)) != ntohl(e.count)))
+ && ((refCount = idcount(&misc->idmap, id)) != ntohl(e.count)))
#else
if ((id >= misc->minId) && (id <= misc->maxId)
&& (id != ANONYMOUSID)
&& ((refCount = misc->idmap[id - misc->minId]) !=
- ntohl(e.count)))
+ ntohl(e.count)))
#endif /* SUPERGROUPS */
{
afs_int32 na;
/* check for duplicate id. This may still lead to duplicate
* names. */
#if defined(SUPERGROUPS)
- if (idcount(&idmap, id))
+ if (idcount(&idmap, id))
#else
- if (idmap[id - misc->minId])
+ if (idmap[id - misc->minId])
#endif
{
fprintf(stderr, "Skipping entry with duplicate id %di\n",
owner = ntohl(e.owner);
#if defined(SUPERGROUPS)
- if (!idcount(&idmap, owner))
+ if (!idcount(&idmap, owner))
#else
- if (idmap[owner - misc->minId] == 0)
+ if (idmap[owner - misc->minId] == 0)
#endif
{
fprintf(stderr,
free(map);
return code;
}
-
+
#include "AFS_component_version_number.c"
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
#ifdef PRINT_MAP_ERROR
-void
+void
print_map(struct map *parm)
{
struct bitmap *map;
return (struct map *)result;
}
-int
+int
write_map(struct map *parm, int (*f) (void *, int), char *arg)
{
struct bitmap *map;
long newpos;
newpos = display_entry(upos);
if (newpos == upos) {
- fprintf(stderr, "pt_util: hash error in %s chain %d\n",
+ fprintf(stderr, "pt_util: hash error in %s chain %d\n",
nflag ? "name":"id", i);
exit(1);
} else
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 count;
afs_int32 reserved[5];
char name[PR_MAXNAMELEN];
-};
+};
struct prlistentries {
afs_int32 flags;
afs_int32 count;
afs_int32 reserved[5];
char name[PR_MAXNAMELEN];
-};
+};
struct PrUpdateEntry {
afs_uint32 Mask;
afs_int32 count;
afs_int32 reserved[5];
char name[PR_MAXNAMELEN];
-};
+};
/* struct VldbUpdateEntry Mask bit values */
const PRUPDATE_NAME = 0x0001;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* to groups. This is an error in normal AFS.
* 2. If adding a group to a group call AddToSGEntry
* to add the id of the group it's a member of.
- *
+ *
* (4) function Delete
*
* 1. Print a messsage if an error is returned from
- * FindByID() and PTDEBUG is defined.
- * 2. If removing a group from a group call
- * RemoveFromSGEntry to remove the id of the
- * group it's a member of.
+ * FindByID() and PTDEBUG is defined.
+ * 2. If removing a group from a group call
+ * RemoveFromSGEntry to remove the id of the
+ * group it's a member of.
* 3. Remove supergroup continuation records.
*
- * (5) function RemoveFromGroup
- *
+ * (5) function RemoveFromGroup
+ *
* 1. Eliminate the code that tests for adding groups
- * to groups. This is an error in normal AFS.
- * 2. If removing a group from a group call
- * RemoveFromSGEntry to remove the id of the
+ * to groups. This is an error in normal AFS.
+ * 2. If removing a group from a group call
+ * RemoveFromSGEntry to remove the id of the
* group it's a member of.
*
- * (6) Add new functions PR_ListSuperGroups and
+ * (6) Add new functions PR_ListSuperGroups and
* listSuperGroups.
- *
+ *
* (7) function isAMemberOf
- *
+ *
* 1. Allow groups to be members of groups.
*
* Transarc does not currently use opcodes past 520, but
extern int prp_group_default;
extern int prp_user_default;
-static afs_int32 iNewEntry(struct rx_call *call, char aname[], afs_int32 aid,
+static afs_int32 iNewEntry(struct rx_call *call, char aname[], afs_int32 aid,
afs_int32 oid, afs_int32 *cid);
-static afs_int32 newEntry(struct rx_call *call, char aname[], afs_int32 flag,
- afs_int32 oid, afs_int32 *aid, afs_int32 *cid);
+static afs_int32 newEntry(struct rx_call *call, char aname[], afs_int32 flag,
+ afs_int32 oid, afs_int32 *aid, afs_int32 *cid);
static afs_int32 whereIsIt(struct rx_call *call, afs_int32 aid, afs_int32 *apos,
afs_int32 *cid);
-static afs_int32 dumpEntry(struct rx_call *call, afs_int32 apos,
+static afs_int32 dumpEntry(struct rx_call *call, afs_int32 apos,
struct prdebugentry *aentry, afs_int32 *cid);
-static afs_int32 addToGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
+static afs_int32 addToGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
afs_int32 *cid);
static afs_int32 nameToID(struct rx_call *call, namelist *aname, idlist *aid);
static afs_int32 idToName(struct rx_call *call, idlist *aid, namelist *aname);
static afs_int32 Delete(struct rx_call *call, afs_int32 aid, afs_int32 *cid);
-static afs_int32 UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
+static afs_int32 UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
struct PrUpdateEntry *uentry, afs_int32 *cid);
-static afs_int32 removeFromGroup(struct rx_call *call, afs_int32 aid,
+static afs_int32 removeFromGroup(struct rx_call *call, afs_int32 aid,
afs_int32 gid, afs_int32 *cid);
-static afs_int32 getCPS(struct rx_call *call, afs_int32 aid, prlist *alist,
+static afs_int32 getCPS(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over, afs_int32 *cid);
static afs_int32 getCPS2(struct rx_call *call, afs_int32 aid, afs_uint32 ahost,
prlist *alist, afs_int32 *over, afs_int32 *cid);
static afs_int32 getHostCPS(struct rx_call *call, afs_uint32 ahost,
prlist *alist, afs_int32 *over);
static afs_int32 listMax(struct rx_call *call, afs_int32 *uid, afs_int32 *gid);
-static afs_int32 setMax(struct rx_call *call, afs_int32 aid, afs_int32 gflag,
+static afs_int32 setMax(struct rx_call *call, afs_int32 aid, afs_int32 gflag,
afs_int32 *cid);
-static afs_int32 listEntry(struct rx_call *call, afs_int32 aid,
+static afs_int32 listEntry(struct rx_call *call, afs_int32 aid,
struct prcheckentry *aentry, afs_int32 *cid);
-static afs_int32 listEntries(struct rx_call *call, afs_int32 flag,
- afs_int32 startindex, prentries *bulkentries,
+static afs_int32 listEntries(struct rx_call *call, afs_int32 flag,
+ afs_int32 startindex, prentries *bulkentries,
afs_int32 *nextstartindex, afs_int32 *cid);
static afs_int32 put_prentries(struct prentry *tentry, prentries *bulkentries);
-static afs_int32 changeEntry(struct rx_call *call, afs_int32 aid, char *name,
+static afs_int32 changeEntry(struct rx_call *call, afs_int32 aid, char *name,
afs_int32 oid, afs_int32 newid, afs_int32 *cid);
-static afs_int32 setFieldsEntry(struct rx_call *call, afs_int32 id,
- afs_int32 mask, afs_int32 flags,
- afs_int32 ngroups, afs_int32 nusers,
- afs_int32 spare1, afs_int32 spare2,
+static afs_int32 setFieldsEntry(struct rx_call *call, afs_int32 id,
+ afs_int32 mask, afs_int32 flags,
+ afs_int32 ngroups, afs_int32 nusers,
+ afs_int32 spare1, afs_int32 spare2,
afs_int32 *cid);
static afs_int32 listElements(struct rx_call *call, afs_int32 aid,
prlist *alist, afs_int32 *over, afs_int32 *cid);
#if defined(SUPERGROUPS)
-static afs_int32 listSuperGroups(struct rx_call *call, afs_int32 aid,
- prlist *alist, afs_int32 *over,
+static afs_int32 listSuperGroups(struct rx_call *call, afs_int32 aid,
+ prlist *alist, afs_int32 *over,
afs_int32 *cid);
#endif
static afs_int32 listOwned(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *lastP, afs_int32 *cid);
static afs_int32 isAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid,
afs_int32 *flag, afs_int32 *cid);
-static afs_int32 addWildCards(struct ubik_trans *tt, prlist *alist,
+static afs_int32 addWildCards(struct ubik_trans *tt, prlist *alist,
afs_uint32 host);
-static afs_int32 WhoIsThisWithName(struct rx_call *acall,
- struct ubik_trans *at, afs_int32 *aid,
+static afs_int32 WhoIsThisWithName(struct rx_call *acall,
+ struct ubik_trans *at, afs_int32 *aid,
char *aname);
/* when we abort, the ubik cachedVersion will be reset, so we'll read in the
#define ABORT_WITH(tt,code) return(ubik_AbortTrans(tt),code)
static int
-CreateOK(struct ubik_trans *ut, afs_int32 cid, afs_int32 oid, afs_int32 flag,
+CreateOK(struct ubik_trans *ut, afs_int32 cid, afs_int32 oid, afs_int32 flag,
int admin)
{
- if (restricted && !admin)
+ if (restricted && !admin)
return 0;
if (flag & PRFOREIGN) {
- /* Foreign users are recognized by the '@' sign and
+ /* Foreign users are recognized by the '@' sign and
* not by the PRFOREIGN flag.
*/
return 0;
}
static afs_int32
-iNewEntry(struct rx_call *call, char aname[], afs_int32 aid, afs_int32 oid,
+iNewEntry(struct rx_call *call, char aname[], afs_int32 aid, afs_int32 oid,
afs_int32 *cid)
{
/* used primarily for conversion - not intended to be used as usual means
afs_int32
-SPR_NewEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
+SPR_NewEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
afs_int32 *aid)
{
afs_int32 code;
}
static afs_int32
-newEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
+newEntry(struct rx_call *call, char aname[], afs_int32 flag, afs_int32 oid,
afs_int32 *aid, afs_int32 *cid)
{
afs_int32 code;
ABORT_WITH(tt, code);
/* this is for cross-cell self registration. It is not added in the
- * SPR_INewEntry because we want self-registration to only do
+ * SPR_INewEntry because we want self-registration to only do
* automatic id assignment.
*/
code = WhoIsThisWithName(call, tt, cid, cname);
afs_int32
-SPR_DumpEntry(struct rx_call *call, afs_int32 apos,
+SPR_DumpEntry(struct rx_call *call, afs_int32 apos,
struct prdebugentry *aentry)
{
afs_int32 code;
}
static afs_int32
-dumpEntry(struct rx_call *call, afs_int32 apos, struct prdebugentry *aentry,
+dumpEntry(struct rx_call *call, afs_int32 apos, struct prdebugentry *aentry,
afs_int32 *cid)
{
afs_int32 code;
if (cell && afs_is_foreign_ticket_name(nameinst,NULL,cell,pr_realmName))
code = NameToID(tt, aname->namelist_val[i], &aid->idlist_val[i]);
- else
+ else
code = NameToID(tt, nameinst, &aid->idlist_val[i]);
if (code != PRSUCCESS)
aid->idlist_val[i] = ANONYMOUSID;
osi_audit(PTS_NmToIdEvent, code, AUD_STR,
- aname->namelist_val[i], AUD_ID, aid->idlist_val[i],
+ aname->namelist_val[i], AUD_ID, aid->idlist_val[i],
AUD_END);
ViceLog(125, ("PTS_NameToID: code %d aname %s aid %d\n", code,
aname->namelist_val[i], aid->idlist_val[i]));
}
afs_int32
-SPR_UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
+SPR_UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
struct PrUpdateEntry *uentry)
{
afs_int32 code;
}
afs_int32
-UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
+UpdateEntry(struct rx_call *call, afs_int32 aid, char *name,
struct PrUpdateEntry *uentry, afs_int32 *cid)
{
afs_int32 code;
}
static afs_int32
-removeFromGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
+removeFromGroup(struct rx_call *call, afs_int32 aid, afs_int32 gid,
afs_int32 *cid)
{
afs_int32 code;
}
static afs_int32
-getCPS(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *over,
+getCPS(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *over,
afs_int32 *cid)
{
afs_int32 code;
afs_int32
-SPR_GetCPS2(struct rx_call *call, afs_int32 aid, afs_int32 ahost,
+SPR_GetCPS2(struct rx_call *call, afs_int32 aid, afs_int32 ahost,
prlist *alist, afs_int32 *over)
{
afs_int32 code;
afs_int32
-SPR_GetHostCPS(struct rx_call *call, afs_int32 ahost, prlist *alist,
+SPR_GetHostCPS(struct rx_call *call, afs_int32 ahost, prlist *alist,
afs_int32 *over)
{
afs_int32 code;
}
static afs_int32
-listEntry(struct rx_call *call, afs_int32 aid, struct prcheckentry *aentry,
+listEntry(struct rx_call *call, afs_int32 aid, struct prcheckentry *aentry,
afs_int32 *cid)
{
afs_int32 code;
}
afs_int32
-SPR_ListEntries(struct rx_call *call, afs_int32 flag, afs_int32 startindex,
+SPR_ListEntries(struct rx_call *call, afs_int32 flag, afs_int32 startindex,
prentries *bulkentries, afs_int32 *nextstartindex)
{
afs_int32 code;
}
static afs_int32
-listEntries(struct rx_call *call, afs_int32 flag, afs_int32 startindex,
+listEntries(struct rx_call *call, afs_int32 flag, afs_int32 startindex,
prentries *bulkentries, afs_int32 *nextstartindex, afs_int32 *cid)
{
afs_int32 code;
}
afs_int32
-SPR_ChangeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
+SPR_ChangeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
afs_int32 newid)
{
afs_int32 code;
}
static afs_int32
-changeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
+changeEntry(struct rx_call *call, afs_int32 aid, char *name, afs_int32 oid,
afs_int32 newid, afs_int32 *cid)
{
afs_int32 code;
}
afs_int32
-SPR_SetFieldsEntry(struct rx_call *call,
- afs_int32 id,
- afs_int32 mask, /* specify which fields to update */
- afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
+SPR_SetFieldsEntry(struct rx_call *call,
+ afs_int32 id,
+ afs_int32 mask, /* specify which fields to update */
+ afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
afs_int32 spare1, afs_int32 spare2)
{
afs_int32 code;
}
static afs_int32
-setFieldsEntry(struct rx_call *call,
- afs_int32 id,
- afs_int32 mask, /* specify which fields to update */
- afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
+setFieldsEntry(struct rx_call *call,
+ afs_int32 id,
+ afs_int32 mask, /* specify which fields to update */
+ afs_int32 flags, afs_int32 ngroups, afs_int32 nusers,
afs_int32 spare1, afs_int32 spare2, afs_int32 *cid)
{
afs_int32 code;
}
afs_int32
-SPR_ListElements(struct rx_call *call, afs_int32 aid, prlist *alist,
+SPR_ListElements(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over)
{
afs_int32 code;
}
static afs_int32
-listElements(struct rx_call *call, afs_int32 aid, prlist *alist,
+listElements(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over, afs_int32 *cid)
{
afs_int32 code;
afs_int32
-SPR_ListSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
+SPR_ListSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over)
{
#if defined(SUPERGROUPS)
#if defined(SUPERGROUPS)
static afs_int32
-listSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
+listSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *over, afs_int32 *cid)
{
afs_int32 code;
#endif /* SUPERGROUPS */
-/*
+/*
* SPR_ListOwned
* List the entries owned by this id. If the id is zero,
* return the orphans list. This will return up to PR_MAXGROUPS
* maximum value is enforced in GetOwnedChain().
*/
afs_int32
-SPR_ListOwned(struct rx_call *call, afs_int32 aid, prlist *alist,
+SPR_ListOwned(struct rx_call *call, afs_int32 aid, prlist *alist,
afs_int32 *lastP)
{
afs_int32 code;
}
afs_int32
-listOwned(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *lastP,
+listOwned(struct rx_call *call, afs_int32 aid, prlist *alist, afs_int32 *lastP,
afs_int32 *cid)
{
afs_int32 code;
}
afs_int32
-SPR_IsAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid,
+SPR_IsAMemberOf(struct rx_call *call, afs_int32 uid, afs_int32 gid,
afs_int32 *flag)
{
afs_int32 code;
}
static afs_int32
-WhoIsThisWithName(struct rx_call *acall, struct ubik_trans *at, afs_int32 *aid,
+WhoIsThisWithName(struct rx_call *acall, struct ubik_trans *at, afs_int32 *aid,
char *aname)
{
/* aid is set to the identity of the caller, if known, else ANONYMOUSID */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* utils.c */
#if defined(SUPERGROUPS)
-extern afs_int32 IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid,
+extern afs_int32 IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid,
afs_int32 gid, afs_int32 depth) ;
#endif /* SUPERGROUPS */
#endif
extern afs_int32 NameHash(unsigned char *aname);
-extern afs_int32 pr_Write(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
+extern afs_int32 pr_Write(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
void *buff, afs_int32 len);
-extern afs_int32 pr_Read(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
+extern afs_int32 pr_Read(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
void *buff, afs_int32 len);
-extern int pr_WriteEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
+extern int pr_WriteEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
struct prentry *tentry);
-extern int pr_ReadEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
+extern int pr_ReadEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
struct prentry *tentry);
-extern int pr_WriteCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
+extern int pr_WriteCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
struct contentry *tentry);
-extern int pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
+extern int pr_ReadCoEntry(struct ubik_trans *tt, afs_int32 afd, afs_int32 pos,
struct contentry *tentry);
extern afs_int32 AllocBlock(struct ubik_trans *at);
extern afs_int32 FreeBlock(struct ubik_trans *at, afs_int32 pos);
extern afs_int32 FindByID(struct ubik_trans *at, afs_int32 aid);
-extern afs_int32 FindByName(struct ubik_trans *at,
+extern afs_int32 FindByName(struct ubik_trans *at,
char aname[PR_MAXNAMELEN], struct prentry *tentryp);
-extern afs_int32 AllocID(struct ubik_trans *at, afs_int32 flag,
+extern afs_int32 AllocID(struct ubik_trans *at, afs_int32 flag,
afs_int32 *aid);
-extern afs_int32 IDToName(struct ubik_trans *at, afs_int32 aid,
+extern afs_int32 IDToName(struct ubik_trans *at, afs_int32 aid,
char aname[PR_MAXNAMELEN]);
-extern afs_int32 NameToID(struct ubik_trans *at,
+extern afs_int32 NameToID(struct ubik_trans *at,
char aname[PR_MAXNAMELEN], afs_int32 *aid);
extern int IDCmp(const void *a, const void *b);
-extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid,
+extern afs_int32 RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid,
afs_int32 *loc);
-extern afs_int32 AddToIDHash(struct ubik_trans *tt, afs_int32 aid,
+extern afs_int32 AddToIDHash(struct ubik_trans *tt, afs_int32 aid,
afs_int32 loc);
-extern afs_int32 RemoveFromNameHash(struct ubik_trans *tt, char *aname,
+extern afs_int32 RemoveFromNameHash(struct ubik_trans *tt, char *aname,
afs_int32 *loc);
-extern afs_int32 AddToNameHash(struct ubik_trans *tt, char *aname,
+extern afs_int32 AddToNameHash(struct ubik_trans *tt, char *aname,
afs_int32 loc);
-extern afs_int32 AddToOwnerChain(struct ubik_trans *at, afs_int32 gid,
+extern afs_int32 AddToOwnerChain(struct ubik_trans *at, afs_int32 gid,
afs_int32 oid);
-extern afs_int32 RemoveFromOwnerChain(struct ubik_trans *at, afs_int32 gid,
+extern afs_int32 RemoveFromOwnerChain(struct ubik_trans *at, afs_int32 gid,
afs_int32 oid);
extern afs_int32 AddToOrphan(struct ubik_trans *at, afs_int32 gid);
extern afs_int32 RemoveFromOrphan(struct ubik_trans *at, afs_int32 gid);
extern afs_int32 IsOwnerOf(struct ubik_trans *at, afs_int32 aid, afs_int32 gid);
extern afs_int32 OwnerOf(struct ubik_trans *at, afs_int32 gid);
-extern afs_int32 IsAMemberOf(struct ubik_trans *at, afs_int32 aid,
+extern afs_int32 IsAMemberOf(struct ubik_trans *at, afs_int32 aid,
afs_int32 gid);
/* ptutils.c */
-extern afs_int32 AddToEntry(struct ubik_trans *tt, struct prentry *entry,
+extern afs_int32 AddToEntry(struct ubik_trans *tt, struct prentry *entry,
afs_int32 loc, afs_int32 aid);
-extern int AccessOK(struct ubik_trans *ut, afs_int32 cid,
+extern int AccessOK(struct ubik_trans *ut, afs_int32 cid,
struct prentry *tentry, int mem, int any);
-extern afs_int32 CreateEntry(struct ubik_trans *at, char aname[],
- afs_int32 *aid, afs_int32 idflag,
+extern afs_int32 CreateEntry(struct ubik_trans *at, char aname[],
+ afs_int32 *aid, afs_int32 idflag,
afs_int32 flag, afs_int32 oid, afs_int32 creator);
-extern afs_int32 RemoveFromEntry(struct ubik_trans *at, afs_int32 aid,
+extern afs_int32 RemoveFromEntry(struct ubik_trans *at, afs_int32 aid,
afs_int32 bid);
extern afs_int32 DeleteEntry(struct ubik_trans *at, struct prentry *tentry,
afs_int32 loc);
-extern afs_int32 GetList(struct ubik_trans *at, struct prentry *tentry,
+extern afs_int32 GetList(struct ubik_trans *at, struct prentry *tentry,
prlist *alist, afs_int32 add);
-extern afs_int32 GetList2(struct ubik_trans *at, struct prentry *tentry,
- struct prentry *tentry2, prlist *alist,
+extern afs_int32 GetList2(struct ubik_trans *at, struct prentry *tentry,
+ struct prentry *tentry2, prlist *alist,
afs_int32 add);
extern afs_int32 GetMax(struct ubik_trans *at, afs_int32 *uid, afs_int32 *gid);
extern afs_int32 SetMax(struct ubik_trans *at, afs_int32 id, afs_int32 flag);
-extern afs_int32 ChangeEntry(struct ubik_trans *at, afs_int32 aid,
- afs_int32 cid, char *name, afs_int32 oid,
+extern afs_int32 ChangeEntry(struct ubik_trans *at, afs_int32 aid,
+ afs_int32 cid, char *name, afs_int32 oid,
afs_int32 newid);
-extern afs_int32 GetOwnedChain(struct ubik_trans *ut, afs_int32 *next,
+extern afs_int32 GetOwnedChain(struct ubik_trans *ut, afs_int32 *next,
prlist *alist);
extern afs_int32 AddToPRList(prlist *alist, int *sizeP, afs_int32 id);
extern afs_int32 read_DbHeader(struct ubik_trans *tt);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
id);
return code;
}
-
+
if (id == 0) {
printf("0 isn't a valid user id; aborting\n");
return EINVAL;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* is a member of (since the entries field is used to
* list it's members). This new field is supergroups and
* has two entries. If more are required, a continuation
- * record is formed.
+ * record is formed.
* There are two additional fields required, nextsg is
* an address of the next continuation record for this
- * group, and countsg is the count for the number of
+ * group, and countsg is the count for the number of
* groups this group is a member of.
- *
+ *
*
*
* 09/18/95 jjm Add mdw's changes to afs-3.3a Changes:
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
alen = strlen(arg);
if (strcmp(argv[a], "-d") == 0) {
if ((a + 1) >= argc) {
- fprintf(stderr, "missing argument for -d\n");
- return -1;
+ fprintf(stderr, "missing argument for -d\n");
+ return -1;
}
debuglevel = atoi(argv[++a]);
LogLevel = debuglevel;
RX_MAX_PACKET_DATA_SIZE);
PT_EXIT(1);
}
- }
+ }
else if (*arg == '-') {
/* hack in help flag support */
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
#else /* defined(UKERNEL) */
if (!cell) {
- if (!tdir)
+ if (!tdir)
tdir = afsconf_Open(confDir);
if (!tdir) {
if (confDir && strcmp(confDir, ""))
}
-int
+int
pr_CreateGroup(char name[PR_MAXNAMELEN], char owner[PR_MAXNAMELEN], afs_int32 *id)
{
afs_int32 code;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "afs/ptint.h"
/* ptuser.c */
-extern afs_int32 pr_Initialize(afs_int32 secLevel, const char *confDir,
+extern afs_int32 pr_Initialize(afs_int32 secLevel, const char *confDir,
char *cell);
extern int pr_End(void);
extern int pr_CreateUser(char name[PR_MAXNAMELEN], afs_int32 *id);
-extern int pr_CreateGroup(char name[PR_MAXNAMELEN], char owner[PR_MAXNAMELEN],
+extern int pr_CreateGroup(char name[PR_MAXNAMELEN], char owner[PR_MAXNAMELEN],
afs_int32 *id);
extern int pr_Delete(char *name);
extern int pr_DeleteByID(afs_int32 id);
extern int pr_ListOwned(afs_int32 oid, namelist *lnames, afs_int32 *moreP);
extern int pr_IDListMembers(afs_int32 gid, namelist *lnames);
extern int pr_ListEntry(afs_int32 id, struct prcheckentry *aentry);
-extern afs_int32 pr_ListEntries(int flag, afs_int32 startindex,
- afs_int32 *nentries,
- struct prlistentries **entries,
+extern afs_int32 pr_ListEntries(int flag, afs_int32 startindex,
+ afs_int32 *nentries,
+ struct prlistentries **entries,
afs_int32 *nextstartindex);
-extern int pr_CheckEntryByName(char *name, afs_int32 *id, char *owner,
+extern int pr_CheckEntryByName(char *name, afs_int32 *id, char *owner,
char *creator);
-extern int pr_CheckEntryById(char *name, afs_int32 id, char *owner,
+extern int pr_CheckEntryById(char *name, afs_int32 id, char *owner,
char *creator);
-extern int pr_ChangeEntry(char *oldname, char *newname, afs_int32 *newid,
+extern int pr_ChangeEntry(char *oldname, char *newname, afs_int32 *newid,
char *newowner);
extern int pr_IsAMemberOf(char *uname, char *gname, afs_int32 *flag);
extern int pr_ListMaxUserId(afs_int32 *mid);
extern int pr_SetMaxUserId(afs_int32 mid);
extern int pr_ListMaxGroupId(afs_int32 *mid);
extern int pr_SetMaxGroupId(afs_int32 mid);
-extern afs_int32 pr_SetFieldsEntry(afs_int32 id, afs_int32 mask,
- afs_int32 flags, afs_int32 ngroups,
+extern afs_int32 pr_SetFieldsEntry(afs_int32 id, afs_int32 mask,
+ afs_int32 flags, afs_int32 ngroups,
afs_int32 nusers);
extern int pr_ListSuperGroups(afs_int32 gid, namelist *lnames);
extern int pr_IDListExpandedMembers(afs_int32 gid, namelist *lnames);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-/*
+/*
* (5) Add functions to process supergroups:
* ChangeIDEntry(), RemoveFromSGEntry(),
* AddToSGEntry(), GetListSG2().
* just after ubik_ServerInit.
*/
-void
+void
pt_hook_write(void)
{
extern struct ubik_dbase *ubik_dbase;
}
} else {
/* A foreign user: <name>@<cell>. The foreign user is added to
- * its representing group. It is
+ * its representing group. It is
*/
char *cellGroup;
afs_int32 pos, n;
return PRBADARG;
tentry.id = *aid;
} else {
- /* Allocate an ID special for this foreign user. It is based
+ /* Allocate an ID special for this foreign user. It is based
* on the representing group's id and nusers count.
*/
tentry.id = allocNextId(at, ¢ry);
}
/* Admins don't get charged for creating a group.
- * If in noAuth mode, you get changed for it but you
+ * If in noAuth mode, you get changed for it but you
* are still allowed to create as many groups as you want.
*/
admin = ((creator == SYSADMINID)
code = pr_ReadEntry(at, 0, loc, &tentry);
if (code)
return PRDBFAIL;
- if (restricted && !IsAMemberOf(at, cid, SYSADMINID))
+ if (restricted && !IsAMemberOf(at, cid, SYSADMINID))
return PRPERM;
if (tentry.owner != cid && !IsAMemberOf(at, cid, SYSADMINID)
&& !IsAMemberOf(at, cid, tentry.owner) && !pr_noAuth)
return code;
}
/* Look through cont entries too. This needs to be broken into
- * seperate transaction so that no one transaction becomes too
+ * seperate transaction so that no one transaction becomes too
* large to complete.
*/
for (nptr = tentry.next; nptr; nptr = centry.next) {
}
cellEntry->nusers = htonl(id);
- /* use the field nusers to keep
+ /* use the field nusers to keep
* the next available id in that
* foreign cell's group. Note :
* It would seem more appropriate
* to use ngroup for that and nusers
* to enforce the quota, however pts
- * does not have an option to change
+ * does not have an option to change
* foreign users quota yet */
id = (id << 16) | cellid;
/*
* The only thing that we want to make sure here is that
* the id is in the legal range of this group. If it is
- * a duplicate we don't care since it will get caught
+ * a duplicate we don't care since it will get caught
* in a different check.
*/
if (cellid != groupid)
return 0; /* not in range */
- /*
+ /*
* if we got here we're ok but we need to update the nusers
- * field in order to get the id correct the next time that
+ * field in order to get the id correct the next time that
* we try to allocate it automatically
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "AFS_component_version_number.c"
-int
+int
main(int argc, char *argv[])
{
afs_int32 code;
}
int
-ubik_BeginTrans(struct ubik_dbase *dbase, afs_int32 transMode,
+ubik_BeginTrans(struct ubik_dbase *dbase, afs_int32 transMode,
struct ubik_trans **transPtr)
{
static int init = 0;
va_start(ap, format);
vprintf(format, ap);
va_end(ap);
-
+
abort();
printf("BACK FROM ABORT\n"); /* shouldn't come back from floating pt exception */
exit(1); /* never know, though */
/* Other declarations */
-int
+int
afsconf_GetNoAuthFlag(struct afsconf_dir *adir)
{
return (1);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#if defined(SUPERGROUPS)
afs_int32
-IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid, afs_int32 gid, afs_int32 depth)
+IsAMemberOfSG(struct ubik_trans *at, afs_int32 aid, afs_int32 gid, afs_int32 depth)
{
/* returns true if aid is a member of gid */
struct prentry tentry;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* In Digital Unix (OSF/1), we use something akin to the ancient sleep/wakeup
* mechanism. The condition variable itself plays no role; we just use its
* address as a convenient unique number.
- *
+ *
* XXX in darwin, both mach and bsd facilities are available. Should really
* stick to one or the other (but mach locks don't have a _try.....)
*
* in darwin 8.0, the bsd lock facility is no longer available, and only one
* sleep variant is available. Still no lock_try, but we can work around that.
- * We can't pass the mutex into msleep, even if we didn't need the two mutex
+ * We can't pass the mutex into msleep, even if we didn't need the two mutex
* hack for lock_try emulation, since msleep won't fixup the owner variable
* and we'll panic.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* and reacquire the mutex when it wakes up.
*/
-/* With 11.23, ksleep_prepare is not defined anywhere and
- * ksleep_one is only referenced in a comment. sleep, get_sleep_lock
+/* With 11.23, ksleep_prepare is not defined anywhere and
+ * ksleep_one is only referenced in a comment. sleep, get_sleep_lock
* and wakeup are defined in driver manuals.
* This works with 11.0, 11i, and 11.23
- * Note: wakeup wakes up all threads waiting on cv.
+ * Note: wakeup wakes up all threads waiting on cv.
*/
#define CV_WAIT(cv, lck) \
sleep((caddr_t)(cv), PRIBIO); \
b_psema(lck); \
} while(0)
-
+
#define CV_SIGNAL(cv) \
do { \
lock_t * sleep_lock = get_sleep_lock((caddr_t)(cv)); \
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
== 0);
assert(pthread_key_create(&rx_thread_id_key, NULL) == 0);
assert(pthread_key_create(&rx_ts_info_key, NULL) == 0);
-
+
rxkad_global_stats_init();
MUTEX_INIT(&rx_rpc_stats, "rx_rpc_stats", MUTEX_DEFAULT, 0);
* rxi_totalMin
*/
-/*
+/*
* The rx_freePktQ_lock protects the following global variables:
- * rx_nFreePackets
+ * rx_nFreePackets
*/
/*
* are locked. To this end, the code has been modified under #ifdef
* RX_ENABLE_LOCKS so that quota checks and reservation occur at the
* same time. A new function, ReturnToServerPool() returns the allocation.
- *
+ *
* A call can be on several queue's (but only one at a time). When
* rxi_ResetCall wants to remove the call from a queue, it has to ensure
* that no one else is touching the queue. To this end, we store the address
void *arg1, int istack);
#endif
-/* We keep a "last conn pointer" in rxi_FindConnection. The odds are
-** pretty good that the next packet coming in is from the same connection
+/* We keep a "last conn pointer" in rxi_FindConnection. The odds are
+** pretty good that the next packet coming in is from the same connection
** as the last packet, since we're send multiple packets in a transmit window.
*/
struct rx_connection *rxLastConn = 0;
#endif /* KERNEL */
char *htable, *ptable;
int tmp_status;
-
+
SPLVAR;
-
+
INIT_PTHREAD_LOCKS;
LOCK_RX_INIT;
if (rxinit_status == 0) {
}
#ifdef RX_ENABLE_TSFPQ
/* no use leaving packets around in this thread's local queue if
- * it isn't getting donated to the server thread pool.
+ * it isn't getting donated to the server thread pool.
*/
rxi_FlushLocalPacketsTSFPQ();
#endif /* RX_ENABLE_TSFPQ */
}
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
-/* Wait for the transmit queue to no longer be busy.
+/* Wait for the transmit queue to no longer be busy.
* requires the call->lock to be held */
static void rxi_WaitforTQBusy(struct rx_call *call) {
while (call->flags & RX_CALL_TQ_BUSY) {
* 0. Maxtime gives the maximum number of seconds this call may take,
* after rx_NewCall returns. After this time interval, a call to any
* of rx_SendData, rx_ReadData, etc. will fail with RX_CALL_TIMEOUT.
- * For fine grain locking, we hold the conn_call_lock in order to
+ * For fine grain locking, we hold the conn_call_lock in order to
* to ensure that we don't get signalle after we found a call in an active
* state and before we go to sleep.
*/
* If so, let them go first to avoid starving them.
* This is a fairly simple scheme, and might not be
* a complete solution for large numbers of waiters.
- *
- * makeCallWaiters keeps track of the number of
- * threads waiting to make calls and the
- * RX_CONN_MAKECALL_WAITING flag bit is used to
+ *
+ * makeCallWaiters keeps track of the number of
+ * threads waiting to make calls and the
+ * RX_CONN_MAKECALL_WAITING flag bit is used to
* indicate that there are indeed calls waiting.
* The flag is set when the waiter is incremented.
* It is only cleared when makeCallWaiters is 0.
conn->makeCallWaiters--;
if (conn->makeCallWaiters == 0)
conn->flags &= ~RX_CONN_MAKECALL_WAITING;
- }
+ }
/* We are now the active thread in rx_NewCall */
conn->flags |= RX_CONN_MAKECALL_ACTIVE;
call->mode = RX_MODE_ERROR;
else
call->mode = RX_MODE_SENDING;
-
+
/* remember start time for call in case we have hard dead time limit */
call->queueTime = queueTime;
clock_GetTime(&call->startTime);
/* Advertise a new service. A service is named locally by a UDP port
* number plus a 16-bit service id. Returns (struct rx_service *) 0
- * on a failure.
+ * on a failure.
*
char *serviceName; Name for identification purposes (e.g. the
service name might be used for probing for
statistics) */
struct rx_service *
-rx_NewServiceHost(afs_uint32 host, u_short port, u_short serviceId,
+rx_NewServiceHost(afs_uint32 host, u_short port, u_short serviceId,
char *serviceName, struct rx_securityClass **securityObjects,
- int nSecurityObjects,
+ int nSecurityObjects,
afs_int32(*serviceProc) (struct rx_call * acall))
{
osi_socket socket = OSI_NULLSOCKET;
/* Set configuration options for all of a service's security objects */
-afs_int32
-rx_SetSecurityConfiguration(struct rx_service *service,
+afs_int32
+rx_SetSecurityConfiguration(struct rx_service *service,
rx_securityConfigVariables type,
void *value)
{
int i;
for (i = 0; i<service->nSecurityObjects; i++) {
if (service->securityObjects[i]) {
- RXS_SetConfiguration(service->securityObjects[i], NULL, type,
+ RXS_SetConfiguration(service->securityObjects[i], NULL, type,
value, NULL);
}
}
/* meltdown:
* One thing that seems to happen is that all the server threads get
* tied up on some empty or slow call, and then a whole bunch of calls
- * arrive at once, using up the packet pool, so now there are more
+ * arrive at once, using up the packet pool, so now there are more
* empty calls. The most critical resources here are server threads
* and the free packet pool. The "doreclaim" code seems to help in
* general. I think that eventually we arrive in this state: there
* are lots of pending calls which do have all their packets present,
* so they won't be reclaimed, are multi-packet calls, so they won't
- * be scheduled until later, and thus are tying up most of the free
+ * be scheduled until later, and thus are tying up most of the free
* packet pool for a very long time.
* future options:
- * 1. schedule multi-packet calls if all the packets are present.
- * Probably CPU-bound operation, useful to return packets to pool.
+ * 1. schedule multi-packet calls if all the packets are present.
+ * Probably CPU-bound operation, useful to return packets to pool.
* Do what if there is a full window, but the last packet isn't here?
* 3. preserve one thread which *only* runs "best" calls, otherwise
* it sleeps and waits for that type of call.
- * 4. Don't necessarily reserve a whole window for each thread. In fact,
+ * 4. Don't necessarily reserve a whole window for each thread. In fact,
* the current dataquota business is badly broken. The quota isn't adjusted
* to reflect how many packets are presently queued for a running call.
* So, when we schedule a queued call with a full window of packets queued
* already executing */
/* One thread will process calls FCFS (to prevent starvation),
* while the other threads may run ahead looking for calls which
- * have all their input data available immediately. This helps
+ * have all their input data available immediately. This helps
* keep threads from blocking, waiting for data from the client. */
for (queue_Scan(&rx_incomingCallQueue, tcall, ncall, rx_call)) {
service = tcall->conn->service;
if (tno == rxi_fcfs_thread_num
|| !tcall->queue_item_header.next) {
MUTEX_EXIT(&rx_pthread_mutex);
- /* If we're the fcfs thread , then we'll just use
- * this call. If we haven't been able to find an optimal
- * choice, and we're at the end of the list, then use a
+ /* If we're the fcfs thread , then we'll just use
+ * this call. If we haven't been able to find an optimal
+ * choice, and we're at the end of the list, then use a
* 2d choice if one has been identified. Otherwise... */
call = (choice2 ? choice2 : tcall);
service = call->conn->service;
* already executing */
/* One thread will process calls FCFS (to prevent starvation),
* while the other threads may run ahead looking for calls which
- * have all their input data available immediately. This helps
+ * have all their input data available immediately. This helps
* keep threads from blocking, waiting for data from the client. */
choice2 = (struct rx_call *)0;
for (queue_Scan(&rx_incomingCallQueue, tcall, ncall, rx_call)) {
if (tno == rxi_fcfs_thread_num
|| !tcall->queue_item_header.next) {
MUTEX_EXIT(&rx_pthread_mutex);
- /* If we're the fcfs thread, then we'll just use
- * this call. If we haven't been able to find an optimal
- * choice, and we're at the end of the list, then use a
+ /* If we're the fcfs thread, then we'll just use
+ * this call. If we haven't been able to find an optimal
+ * choice, and we're at the end of the list, then use a
* 2d choice if one has been identified. Otherwise... */
call = (choice2 ? choice2 : tcall);
service = call->conn->service;
queue_Remove(call);
/* we can't schedule a call if there's no data!!! */
/* send an ack if there's no data, if we're missing the
- * first packet, or we're missing something between first
+ * first packet, or we're missing something between first
* and last -- there's a "hole" in the incoming data. */
if (queue_IsEmpty(&call->rq)
|| queue_First(&call->rq, rx_packet)->header.seq != 1
* and will also be called if there is an error condition on the or
* the call is complete. Used by multi rx to build a selection
* function which determines which of several calls is likely to be a
- * good one to read from.
+ * good one to read from.
* NOTE: the way this is currently implemented it is probably only a
* good idea to (1) use it immediately after a newcall (clients only)
* and (2) only use it once. Other uses currently void your warranty
rxi_CallError(call, rc);
/* Send an abort message to the peer if this error code has
* only just been set. If it was set previously, assume the
- * peer has already been sent the error code or will request it
+ * peer has already been sent the error code or will request it
*/
rxi_SendCallAbort(call, (struct rx_packet *)0, 0, 0);
}
rxi_FreePacket(call->currentPacket);
call->currentPacket = (struct rx_packet *)0;
}
-
+
call->nLeft = call->nFree = call->curlen = 0;
/* Free any packets from the last call to ReadvProc/WritevProc */
#ifdef RXDEBUG_PACKET
call->allNextp = rx_allCallsp;
rx_allCallsp = call;
- call->call_id =
+ call->call_id =
#endif /* RXDEBUG_PACKET */
rx_MutexIncrement(rx_stats.nCallStructs, rx_stats_mutex);
-
+
MUTEX_EXIT(&rx_freeCallQueue_lock);
MUTEX_INIT(&call->lock, "call lock", MUTEX_DEFAULT, NULL);
MUTEX_ENTER(&call->lock);
osi_Free(addr, size);
}
-void
+void
rxi_SetPeerMtu(struct rx_peer *peer, afs_uint32 host, afs_uint32 port, int mtu)
{
struct rx_peer **peer_ptr = NULL, **peer_end = NULL;
/* Find the peer process represented by the supplied (host,port)
* combination. If there is no appropriate active peer structure, a
- * new one will be allocated and initialized
+ * new one will be allocated and initialized
* The origPeer, if set, is a pointer to a peer structure on which the
* refcount will be be decremented. This is used to replace the peer
* structure hanging off a connection structure */
MUTEX_EXIT(&conn->conn_call_lock);
*call->callNumber = np->header.callNumber;
#ifdef RXDEBUG
- if (np->header.callNumber == 0)
+ if (np->header.callNumber == 0)
dpf(("RecPacket call 0 %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %"AFS_PTR_FMT" resend %d.%.06d len %d",
np->header.serial, rx_packetTypes[np->header.type - 1], ntohl(conn->peer->host), ntohs(conn->peer->port),
np->header.serial, np->header.epoch, np->header.cid, np->header.callNumber, np->header.seq,
*/
if ((rx_BusyThreshold > 0) && (rx_nWaiting > rx_BusyThreshold)) {
struct rx_packet *tp;
-
+
rxi_CallError(call, rx_BusyError);
tp = rxi_SendCallAbort(call, np, 1, 0);
MUTEX_EXIT(&call->lock);
rxi_ResetCall(call, 0);
*call->callNumber = np->header.callNumber;
#ifdef RXDEBUG
- if (np->header.callNumber == 0)
+ if (np->header.callNumber == 0)
dpf(("RecPacket call 0 %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %"AFS_PTR_FMT" resend %d.%06d len %d",
np->header.serial, rx_packetTypes[np->header.type - 1], ntohl(conn->peer->host), ntohs(conn->peer->port),
np->header.serial, np->header.epoch, np->header.cid, np->header.callNumber, np->header.seq,
* traversing the tq in rxi_Start sending packets out because
* packets may move to the freePacketQueue as result of being here!
* So we drop these packets until we're safely out of the
- * traversing. Really ugly!
+ * traversing. Really ugly!
* For fine grain RX locking, we set the acked field in the
* packets and let rxi_Start remove them from the transmit queue.
*/
/* XXX I'm not sure this is exactly right, since tfirst **IS**
* XXX unacknowledged. I think that this is off-by-one, but
* XXX I don't dare change it just yet, since it will
- * XXX interact badly with the server-restart detection
+ * XXX interact badly with the server-restart detection
* XXX code in receiveackpacket. */
if (ntohl(rx_GetInt32(np, FIRSTACKOFFSET)) < call->tfirst) {
if (rx_stats_active)
* so this will be quite important with very large window sizes.
* Skew is checked against 0 here to avoid any dependence on the type of
* inPacketSkew (which may be unsigned). In C, -1 > (unsigned) 0 is always
- * true!
+ * true!
* The inPacketSkew should be a smoothed running value, not just a maximum. MTUXXX
* see CalculateRoundTripTime for an example of how to keep smoothed values.
* I think using a beta of 1/8 is probably appropriate. 93.04.21
* traversing the tq in rxi_Start sending packets out because
* packets may move to the freePacketQueue as result of being
* here! So we drop these packets until we're safely out of the
- * traversing. Really ugly!
+ * traversing. Really ugly!
* For fine grain RX locking, we set the acked field in the packets
* and let rxi_Start remove the packets from the transmit queue.
*/
if (!conn->checkReachEvent) {
conn->refCount++;
conn->checkReachEvent =
- rxevent_PostNow(&when, &now, rxi_CheckReachEvent, conn,
+ rxevent_PostNow(&when, &now, rxi_CheckReachEvent, conn,
NULL);
}
MUTEX_EXIT(&conn->conn_data_lock);
int newPackets = 0;
int didHardAck = 0;
int haveLast = 0;
- afs_uint32 seq;
+ afs_uint32 seq;
afs_uint32 serial=0, flags=0;
int isFirst;
struct rx_packet *tnp;
}
}
- /* We need to send an ack of the packet is out of sequence,
+ /* We need to send an ack of the packet is out of sequence,
* or if an ack was requested by the peer. */
if (seq != prev + 1 || missing) {
ackNeeded = RX_ACK_OUT_OF_SEQUENCE;
nAcks = MIN((unsigned)nbytes, (unsigned)ap->nAcks);
first = ntohl(ap->firstPacket);
serial = ntohl(ap->serial);
- /* temporarily disabled -- needs to degrade over time
+ /* temporarily disabled -- needs to degrade over time
* skew = ntohs(ap->maxSkew); */
/* Ignore ack packets received out of order */
len = _snprintf(msg, sizeof(msg),
"tid[%d] RACK: reason %s serial %u previous %u seq %u skew %d first %u acks %u space %u ",
- GetCurrentThreadId(), rx_ack_reason(ap->reason),
+ GetCurrentThreadId(), rx_ack_reason(ap->reason),
ntohl(ap->serial), ntohl(ap->previousPacket),
- (unsigned int)np->header.seq, (unsigned int)skew,
+ (unsigned int)np->header.seq, (unsigned int)skew,
ntohl(ap->firstPacket), ap->nAcks, ntohs(ap->bufferSpace) );
if (nAcks) {
int offset;
- for (offset = 0; offset < nAcks && len < sizeof(msg); offset++)
+ for (offset = 0; offset < nAcks && len < sizeof(msg); offset++)
msg[len++] = (ap->acks[offset] == RX_ACK_TYPE_NACK ? '-' : '*');
}
msg[len++]='\n';
* packets (osi_NetSend) we drop all acks while we're traversing the tq
* in rxi_Start sending packets out because packets may move to the
* freePacketQueue as result of being here! So we drop these packets until
- * we're safely out of the traversing. Really ugly!
+ * we're safely out of the traversing. Really ugly!
* To make it even uglier, if we're using fine grain locking, we can
* set the ack bits in the packets and have rxi_Start remove the packets
* when it's done transmitting.
backedOff = 1;
}
- /* If packet isn't yet acked, and it has been transmitted at least
- * once, reset retransmit time using latest timeout
- * ie, this should readjust the retransmit timer for all outstanding
+ /* If packet isn't yet acked, and it has been transmitted at least
+ * once, reset retransmit time using latest timeout
+ * ie, this should readjust the retransmit timer for all outstanding
* packets... So we don't just retransmit when we should know better*/
if (!(tp->flags & RX_PKTFLAG_ACKED) && !clock_IsZero(&tp->retryTime)) {
if (np->length >= rx_AckDataSize(ap->nAcks) + 2 * sizeof(afs_int32)) {
afs_uint32 tSize;
- /* If the ack packet has a "recommended" size that is less than
+ /* If the ack packet has a "recommended" size that is less than
* what I am using now, reduce my size to match */
rx_packetread(np, rx_AckDataSize(ap->nAcks) + (int)sizeof(afs_int32),
(int)sizeof(afs_int32), &tSize);
tSize = rxi_AdjustMaxMTU(peer->natMTU, tSize);
/* sanity check - peer might have restarted with different params.
- * If peer says "send less", dammit, send less... Peer should never
+ * If peer says "send less", dammit, send less... Peer should never
* be unable to accept packets of the size that prior AFS versions would
* send without asking. */
if (peer->maxMTU != tSize) {
sizeof(afs_int32), &tSize);
tSize = (afs_uint32) ntohl(tSize);
/*
- * As of AFS 3.5 we set the send window to match the receive window.
+ * As of AFS 3.5 we set the send window to match the receive window.
*/
if (tSize < call->twind) {
call->twind = tSize;
call->flags &= ~RX_CALL_WAIT_PROC;
if (queue_IsOnQueue(call)) {
queue_Remove(call);
-
+
MUTEX_ENTER(&rx_waiting_mutex);
rx_nWaiting--;
MUTEX_EXIT(&rx_waiting_mutex);
{
if (queue_IsNotEmpty(&call->rq)) {
u_short count;
-
+
count = rxi_FreePackets(0, &call->rq);
rx_packetReclaims += count;
#ifdef RXDEBUG_PACKET
call->rqc -= count;
- if ( call->rqc != 0 )
+ if ( call->rqc != 0 )
dpf(("rxi_ClearReceiveQueue call %"AFS_PTR_FMT" rqc %u != 0", call, call->rqc));
#endif
call->flags &= ~(RX_CALL_RECEIVE_DONE | RX_CALL_HAVE_LAST);
rxi_ClearReceiveQueue(call);
/* why init the queue if you just emptied it? queue_Init(&call->rq); */
-
+
if (call->currentPacket) {
call->currentPacket->flags &= ~RX_PKTFLAG_CP;
call->currentPacket->flags |= RX_PKTFLAG_IOVQ;
call->curlen = call->nLeft = call->nFree = 0;
#ifdef RXDEBUG_PACKET
- call->iovqc -=
+ call->iovqc -=
#endif
rxi_FreePackets(0, &call->iovq);
if (queue_IsOnQueue(call)) {
queue_Remove(call);
if (flags & RX_CALL_WAIT_PROC) {
-
+
MUTEX_ENTER(&rx_waiting_mutex);
rx_nWaiting--;
MUTEX_EXIT(&rx_waiting_mutex);
* higher level yet (unless, of course, the sender decides to abort
* the call altogether). Any of p, seq, serial, pflags, or reason may
* be set to zero without ill effect. That is, if they are zero, they
- * will not convey any information.
+ * will not convey any information.
* NOW there is a trailer field, after the ack where it will safely be
- * ignored by mundanes, which indicates the maximum size packet this
+ * ignored by mundanes, which indicates the maximum size packet this
* host can swallow. */
/*
- struct rx_packet *optionalPacket; use to send ack (or null)
- int seq; Sequence number of the packet we are acking
- int serial; Serial number of the packet
- int pflags; Flags field from packet header
- int reason; Reason an acknowledge was prompted
+ struct rx_packet *optionalPacket; use to send ack (or null)
+ int seq; Sequence number of the packet we are acking
+ int serial; Serial number of the packet
+ int pflags; Flags field from packet header
+ int reason; Reason an acknowledge was prompted
*/
struct rx_packet *
ap->previousPacket = htonl(call->rprev); /* Previous packet received */
/* No fear of running out of ack packet here because there can only be at most
- * one window full of unacknowledged packets. The window size must be constrained
+ * one window full of unacknowledged packets. The window size must be constrained
* to be less than the maximum ack size, of course. Also, an ack should always
* fit into a single packet -- it should not ever be fragmented. */
for (offset = 0, queue_Scan(&call->rq, rqp, nxp, rx_packet)) {
len = _snprintf(msg, sizeof(msg),
"tid[%d] SACK: reason %s serial %u previous %u seq %u first %u acks %u space %u ",
- GetCurrentThreadId(), rx_ack_reason(ap->reason),
+ GetCurrentThreadId(), rx_ack_reason(ap->reason),
ntohl(ap->serial), ntohl(ap->previousPacket),
(unsigned int)p->header.seq, ntohl(ap->firstPacket),
ap->nAcks, ntohs(ap->bufferSpace) );
if (ap->nAcks) {
int offset;
- for (offset = 0; offset < ap->nAcks && len < sizeof(msg); offset++)
+ for (offset = 0; offset < ap->nAcks && len < sizeof(msg); offset++)
msg[len++] = (ap->acks[offset] == RX_ACK_TYPE_NACK ? '-' : '*');
}
msg[len++]='\n';
#ifdef RX_ENABLE_LOCKS
/* Call rxi_Start, below, but with the call lock held. */
void
-rxi_StartUnlocked(struct rxevent *event,
+rxi_StartUnlocked(struct rxevent *event,
void *arg0, void *arg1, int istack)
{
struct rx_call *call = arg0;
-
+
MUTEX_ENTER(&call->lock);
rxi_Start(event, call, arg1, istack);
MUTEX_EXIT(&call->lock);
* better optimized for new packets, the usual case, now that we've
* got rid of queues of send packets. XXXXXXXXXXX */
void
-rxi_Start(struct rxevent *event,
+rxi_Start(struct rxevent *event,
void *arg0, void *arg1, int istack)
{
struct rx_call *call = arg0;
-
+
struct rx_packet *p;
struct rx_packet *nxp; /* Next pointer for queue_Scan */
struct rx_peer *peer = call->conn->peer;
/* Transmit the packet if it needs to be sent. */
if (!clock_Lt(&now, &p->retryTime)) {
if (nXmitPackets == maxXmitPackets) {
- rxi_SendXmitList(call, xmitList, nXmitPackets,
- istack, &now, &retryTime,
+ rxi_SendXmitList(call, xmitList, nXmitPackets,
+ istack, &now, &retryTime,
resending);
- osi_Free(xmitList, maxXmitPackets *
+ osi_Free(xmitList, maxXmitPackets *
sizeof(struct rx_packet *));
goto restart;
}
#ifdef RX_ENABLE_LOCKS
CALL_HOLD(call, RX_CALL_REFCOUNT_RESEND);
call->resendEvent =
- rxevent_PostNow2(&retryTime, &usenow,
+ rxevent_PostNow2(&retryTime, &usenow,
rxi_StartUnlocked,
(void *)call, 0, istack);
#else /* RX_ENABLE_LOCKS */
call->resendEvent =
- rxevent_PostNow2(&retryTime, &usenow, rxi_Start,
+ rxevent_PostNow2(&retryTime, &usenow, rxi_Start,
(void *)call, 0, istack);
#endif /* RX_ENABLE_LOCKS */
}
#endif
#endif
);
-
+
if (ire && ire->ire_max_frag > 0)
rxi_SetPeerMtu(NULL, conn->peer->host, 0,
ire->ire_max_frag);
conn = call->conn;
if ((now - call->lastSendTime) > conn->secondsUntilPing) {
/* Don't try to send keepalives if there is unacknowledged data */
- /* the rexmit code should be good enough, this little hack
+ /* the rexmit code should be good enough, this little hack
* doesn't quite work XXX */
(void)rxi_SendAck(call, NULL, 0, RX_ACK_PING, 0);
}
void *arg1, void *unused)
{
struct rx_connection *conn = arg1;
-
+
afs_int32 error;
struct rx_packet *packet;
/* This routine is called to send call abort messages
* that have been delayed to throttle looping clients. */
void
-rxi_SendDelayedCallAbort(struct rxevent *event,
+rxi_SendDelayedCallAbort(struct rxevent *event,
void *arg1, void *dummy)
{
struct rx_call *call = arg1;
-
+
afs_int32 error;
struct rx_packet *packet;
* issues a challenge to the client, which is obtained from the
* security object associated with the connection */
void
-rxi_ChallengeEvent(struct rxevent *event,
+rxi_ChallengeEvent(struct rxevent *event,
void *arg0, void *arg1, int tries)
{
struct rx_connection *conn = arg0;
-
+
conn->challengeEvent = NULL;
if (RXS_CheckAuthentication(conn->securityObject, conn) != 0) {
struct rx_packet *packet;
} else {
/* I don't have a stored RTT so I start with this value. Since I'm
* probably just starting a call, and will be pushing more data down
- * this, I expect congestion to increase rapidly. So I fudge a
+ * this, I expect congestion to increase rapidly. So I fudge a
* little, and I set deviance to half the rtt. In practice,
* deviance tends to approach something a little less than
* half the smoothed rtt. */
peer->timeout.sec, peer->timeout.usec, peer->smRtt,
peer->packetSize));
peer->maxWindow = minTime;
- elide... call->twind = minTime;
+ elide... call->twind = minTime;
}
*/
va_end(ap);
#else
struct clock now;
-
+
va_start(ap, format);
clock_GetTime(&now);
tv_delta.tv_sec = tv_wake.tv_sec;
tv_delta.tv_usec = tv_wake.tv_usec;
gettimeofday(&tv_now, 0);
-
+
if (tv_delta.tv_usec < tv_now.tv_usec) {
/* borrow */
tv_delta.tv_usec += 1000000;
tv_delta.tv_sec--;
}
tv_delta.tv_usec -= tv_now.tv_usec;
-
+
if (tv_delta.tv_sec < tv_now.tv_sec) {
/* time expired */
break;
}
tv_delta.tv_sec -= tv_now.tv_sec;
-
+
#ifdef AFS_NT40_ENV
code = select(0, &imask, 0, 0, &tv_delta);
#else /* AFS_NT40_ENV */
code =
recvfrom(socket, tbuffer, sizeof(tbuffer), 0,
(struct sockaddr *)&faddr, &faddrLen);
-
+
if (code > 0) {
memcpy(&theader, tbuffer, sizeof(struct rx_header));
if (counter == ntohl(theader.callNumber))
}
waitTime <<= 1;
}
-
+
success:
code -= sizeof(struct rx_header);
if (code > outputLength)
return rc;
}
-afs_int32
+afs_int32
rx_GetLocalPeers(afs_uint32 peerHost, afs_uint16 peerPort,
struct rx_debugPeer * peerStats)
{
afs_uint32 hashValue = PEER_HASH(peerHost, peerPort);
MUTEX_ENTER(&rx_peerHashTable_lock);
- for(tp = rx_peerHashTable[hashValue];
+ for(tp = rx_peerHashTable[hashValue];
tp != NULL; tp = tp->next) {
if (tp->host == peerHost)
break;
"\r\n",
cookie, c, c->call_id, (afs_uint32)c->state, (afs_uint32)c->mode, c->conn, c->conn?c->conn->epoch:0, c->conn?c->conn->cid:0,
c->callNumber?*c->callNumber:0, c->conn?c->conn->flags:0, c->flags,
- (afs_uint32)c->rqc, (afs_uint32)rqc, (afs_uint32)c->tqc, (afs_uint32)tqc, (afs_uint32)c->iovqc, (afs_uint32)iovqc,
- (afs_uint32)c->localStatus, (afs_uint32)c->remoteStatus, c->error, c->timeout,
+ (afs_uint32)c->rqc, (afs_uint32)rqc, (afs_uint32)c->tqc, (afs_uint32)tqc, (afs_uint32)c->iovqc, (afs_uint32)iovqc,
+ (afs_uint32)c->localStatus, (afs_uint32)c->remoteStatus, c->error, c->timeout,
c->resendEvent?1:0, c->timeoutEvent?1:0, c->keepAliveEvent?1:0, c->delayedAckEvent?1:0, c->delayedAbortEvent?1:0,
c->abortCode, c->abortCount, c->lastSendTime, c->lastReceiveTime, c->lastSendData
#ifdef RX_ENABLE_LOCKS
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define rx_PutConnection(conn) rx_DestroyConnection(conn)
-/* A connection is an authenticated communication path, allowing
+/* A connection is an authenticated communication path, allowing
limited multiple asynchronous conversations. */
#ifdef KDUMP_RX_LOCK
struct rx_connection_rx_lock {
* The following fields are accessed while the call is unlocked.
* These fields are used by the caller/server thread to marshall
* and unmarshall RPC data. The only time they may be changed by
- * other threads is when the RX_CALL_IOVEC_WAIT flag is set.
- *
+ * other threads is when the RX_CALL_IOVEC_WAIT flag is set.
+ *
* NOTE: Be sure that these fields start and end on a double
* word boundary. Otherwise threads that are changing
* adjacent fields will cause problems.
short refCDebug[RX_CALL_REFCOUNT_MAX];
#endif /* RX_REFCOUNT_CHECK */
- /*
+ /*
* iov, iovNBytes, iovMax, and iovNext are set in rxi_ReadvProc()
* and adjusted by rxi_FillReadVec(). iov does not own the buffers
* it refers to. The buffers belong to the packets stored in iovq.
#define RX_ACK_PING 6 /* This is a keep-alive ack */
#define RX_ACK_PING_RESPONSE 7 /* Ack'ing because we were pinged */
#define RX_ACK_DELAY 8 /* Ack generated since nothing has happened since receiving packet */
-#define RX_ACK_IDLE 9 /* Similar to RX_ACK_DELAY, but can
+#define RX_ACK_IDLE 9 /* Similar to RX_ACK_DELAY, but can
* be used to compute RTT */
#define RX_ACK_MTU -1 /* will be rewritten to ACK_PING */
/* Configuration settings */
-/* Enum for storing configuration variables which can be set via the
+/* Enum for storing configuration variables which can be set via the
* SetConfiguration method in the rx_securityClass, below
*/
object--; \
MUTEX_EXIT(&mutex); \
} while(0)
-#endif
+#endif
#endif /* _RX_ End of rx.h */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
exit(1);
}
clockInitialized = 1;
-
+
clock_UpdateTime();
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
cacheConn->inUse--;
/*
* check to see if the connection is in error.
- * If it is, mark its cache entry so it won't be
+ * If it is, mark its cache entry so it won't be
* given out subsequently. If nobody is using it, delete
* it from the cache
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int nAdjusted = 0;
struct rxepoch *qep, *nqep;
struct rxevent *qev, *nqev;
-
+
for (queue_Scan(&rxepoch_queue, qep, nqep, rxepoch)) {
for (queue_Scan(&qep->events, qev, nqev, rxevent)) {
if (clock_Gt(&qev->eventTime, adjTime)) {
- clock_Sub(&qev->eventTime, adjTime);
+ clock_Sub(&qev->eventTime, adjTime);
nAdjusted++;
}
}
* units. */
static struct rxevent *
-_rxevent_Post(struct clock *when, struct clock *now,
- void (*func) (struct rxevent *, void *, void *, int),
+_rxevent_Post(struct clock *when, struct clock *now,
+ void (*func) (struct rxevent *, void *, void *, int),
void *arg, void *arg1, int arg2, int newargs)
{
struct rxevent *ev, *evqe, *evqpr;
}
struct rxevent *
-rxevent_Post(struct clock *when,
- void (*func) (struct rxevent *, void *, void *),
+rxevent_Post(struct clock *when,
+ void (*func) (struct rxevent *, void *, void *),
void *arg, void *arg1)
{
struct clock now;
clock_Zero(&now);
- return _rxevent_Post(when, &now,
+ return _rxevent_Post(when, &now,
(void (*)(struct rxevent *, void *, void *, int))func,
arg, arg1, 0, 0);
}
struct rxevent *
-rxevent_Post2(struct clock *when,
- void (*func) (struct rxevent *, void *, void *, int),
+rxevent_Post2(struct clock *when,
+ void (*func) (struct rxevent *, void *, void *, int),
void *arg, void *arg1, int arg2)
{
struct clock now;
}
struct rxevent *
-rxevent_PostNow(struct clock *when, struct clock *now,
- void (*func) (struct rxevent *, void *, void *),
+rxevent_PostNow(struct clock *when, struct clock *now,
+ void (*func) (struct rxevent *, void *, void *),
void *arg, void *arg1)
{
- return _rxevent_Post(when, now,
+ return _rxevent_Post(when, now,
(void (*)(struct rxevent *, void *, void *, int))func,
arg, arg1, 0, 0);
}
struct rxevent *
-rxevent_PostNow2(struct clock *when, struct clock *now,
- void (*func) (struct rxevent *, void *, void *, int),
+rxevent_PostNow2(struct clock *when, struct clock *now,
+ void (*func) (struct rxevent *, void *, void *, int),
void *arg, void *arg1, int arg2)
{
return _rxevent_Post(when, now, func, arg, arg1, arg2, 1);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "rx_clock.h"
#endif /* KERNEL */
-/* An event is something that will happen at (or after) a specified clock
- * time, unless cancelled prematurely. The user routine (*func)() is called
- * with arguments (event, arg, arg1) when the event occurs.
- * Warnings:
- * (1) The user supplied routine should NOT cause process preemption.
- * (2) The event passed to the user is still on the event queue at that
- * time. The user must not remove (event_Cancel) it explicitly, but
- * the user may remove or schedule any OTHER event at this time.
+/* An event is something that will happen at (or after) a specified clock
+ * time, unless cancelled prematurely. The user routine (*func)() is called
+ * with arguments (event, arg, arg1) when the event occurs.
+ * Warnings:
+ * (1) The user supplied routine should NOT cause process preemption.
+ * (2) The event passed to the user is still on the event queue at that
+ * time. The user must not remove (event_Cancel) it explicitly, but
+ * the user may remove or schedule any OTHER event at this time.
*/
struct rxevent {
struct rx_queue junk; /* Events are queued */
struct clock eventTime; /* When this event times out (in clock.c units) */
union {
- void (*oldfunc) (struct rxevent *, void *, void *);
+ void (*oldfunc) (struct rxevent *, void *, void *);
void (*newfunc) (struct rxevent *, void *, void *, int);
} func; /* Function to call when this expires */
void *arg; /* Argument to the function */
struct rx_queue events; /* list of events for this epoch */
};
-/* Some macros to make macros more reasonable (this allows a block to be
- * used within a macro which does not cause if statements to screw up).
- * That is, you can use "if (...) macro_name(); else ...;" without
+/* Some macros to make macros more reasonable (this allows a block to be
+ * used within a macro which does not cause if statements to screw up).
+ * That is, you can use "if (...) macro_name(); else ...;" without
* having things blow up on the semi-colon. */
#ifndef BEGIN
#define END } while(0)
#endif
-/* This routine must be called to initialize the event package.
- * nEvents is the number of events to allocate in a batch whenever
- * more are needed. If this is 0, a default number (10) will be
+/* This routine must be called to initialize the event package.
+ * nEvents is the number of events to allocate in a batch whenever
+ * more are needed. If this is 0, a default number (10) will be
* allocated. */
#if 0
extern void rxevent_Init( /* nEvents, scheduler */ );
extern void exevent_NextEvent( /* when */ );
#endif
-/* Arrange for the indicated event at the appointed time. When is a
+/* Arrange for the indicated event at the appointed time. When is a
* "struct clock", in the clock.c time base */
#if 0
extern struct rxevent *rxevent_Post( /* when, func, arg, arg1 */ );
#endif
-/* Remove the indicated event from the event queue. The event must be
- * pending. Also see the warning, above. The event pointer supplied
- * is zeroed.
+/* Remove the indicated event from the event queue. The event must be
+ * pending. Also see the warning, above. The event pointer supplied
+ * is zeroed.
*/
#ifdef RX_ENABLE_LOCKS
#ifdef RX_REFCOUNT_CHECK
END
#endif /* RX_ENABLE_LOCKS */
-/* The actions specified for each event that has reached the current clock
- * time will be taken. The current time returned by GetTime is used
- * (warning: this may be an old time if the user has not called
- * clock_NewTime)
+/* The actions specified for each event that has reached the current clock
+ * time will be taken. The current time returned by GetTime is used
+ * (warning: this may be an old time if the user has not called
+ * clock_NewTime)
*/
#if 0
extern int rxevent_RaiseEvents();
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return 0;
}
-/* this function returns the total number of interface addresses
+/* this function returns the total number of interface addresses
** the buffer has to be passed in by the caller
*/
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
a->sin_addr.s_addr));
} else {
struct ifreq ifr;
-
+
addrBuffer[count] = a->sin_addr.s_addr;
a = (struct sockaddr_in *) info.rti_info[RTAX_NETMASK];
if (a)
cp += sizeof(ifr->ifr_name) + MAX(a->sin_len, sizeof(*a))
#endif
#endif
- )
+ )
#else
- for (i = 0; i < len; ++i)
+ for (i = 0; i < len; ++i)
#endif
{
#if defined(AFS_AIX41_ENV) || defined (AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
if (rxi_IsLoopbackIface(a, ifr->ifr_flags))
continue; /* skip loopback address as well. */
} else {
- if (ifr->ifr_flags & IFF_LOOPBACK)
+ if (ifr->ifr_flags & IFF_LOOPBACK)
continue; /* skip aliased loopbacks as well. */
}
if (count >= maxSize) /* no more space */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define EXT2 __declspec(dllexport)
#else
#define EXT
-#define EXT2
+#define EXT2
#endif
#ifdef KERNEL
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Variables to control RX overload management. When the number of calls
* waiting for a thread exceed the threshold, new calls are aborted
- * with the busy error.
+ * with the busy error.
*/
EXT int rx_BusyThreshold GLOBALSINIT(-1); /* default is disabled */
EXT int rx_BusyError GLOBALSINIT(-1);
#define RX_REAP_TIME 60 /* Check for tossable connections every 60 seconds */
#endif
-#define RX_FAST_ACK_RATE 1 /* as of 3.4, ask for an ack every
+#define RX_FAST_ACK_RATE 1 /* as of 3.4, ask for an ack every
* other packet. */
EXT int rx_minPeerTimeout GLOBALSINIT(350); /* in milliseconds */
struct rx_queue queue;
int len; /* local queue length */
int delta; /* number of new packets alloc'd locally since last sync w/ global queue */
-
+
/* FPQ stats */
int checkin_ops;
int checkin_xfer;
* also set minimum values of 15 and 3. Given the algorithms, the number of buffers allocated
* by each call to AllocPacketBufs() will increase indefinitely without a cap on the transfer
* glob size. A cap of 64 is selected because that will produce an allocation of greater than
- * three times that amount which is greater than half of ncalls * maxReceiveWindow.
+ * three times that amount which is greater than half of ncalls * maxReceiveWindow.
* Must be called under rx_packets_mutex.
*/
#define RX_TS_FPQ_COMPUTE_LIMITS \
rx_TSFPQLocalMax = newmax; \
rx_TSFPQGlobSize = newglob; \
} while(0)
-/* record the number of packets allocated by this thread
+/* record the number of packets allocated by this thread
* and stored in the thread local queue */
#define RX_TS_FPQ_LOCAL_ALLOC(rx_ts_info_p,num_alloc) \
do { \
(rx_ts_info_p)->_FPQ.lalloc_ops++; \
(rx_ts_info_p)->_FPQ.lalloc_xfer += num_alloc; \
} while (0)
-/* record the number of packets allocated by this thread
+/* record the number of packets allocated by this thread
* and stored in the global queue */
#define RX_TS_FPQ_GLOBAL_ALLOC(rx_ts_info_p,num_alloc) \
do { \
(rx_ts_info_p)->_FPQ.checkin_xfer++; \
} while(0)
/* check multiple packets into the thread-specific free packet queue */
-/* num_transfer must equal length of (q); it is not a means of checking
- * in part of (q). passing num_transfer just saves us instructions
+/* num_transfer must equal length of (q); it is not a means of checking
+ * in part of (q). passing num_transfer just saves us instructions
* since caller already knows length of (q) for other reasons */
#define RX_TS_FPQ_QCHECKIN(rx_ts_info_p,num_transfer,q) \
do { \
#define dpf(args) FSLog args
#else
#define dpf(args) do { if (rx_debugFile) rxi_DebugPrint args; } while (0)
-#endif
+#endif
#endif
#define rx_Log_event rxevent_debugFile
#if defined(AFS_PTHREAD_ENV)
EXT int rxi_fcfs_thread_num GLOBALSINIT(0);
EXT pthread_key_t rx_thread_id_key;
-/* keep track of pthread numbers - protected by rx_stats_mutex,
+/* keep track of pthread numbers - protected by rx_stats_mutex,
* except in rx_Init() before mutex exists! */
EXT int rxi_pthread_hinum GLOBALSINIT(0);
#else
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
addrs[i++] = ifinaddr;
if (!rx_IsLoopbackAddr(ifinaddr) &&
(maxmtu > rx_maxReceiveSize)) {
- rx_maxReceiveSize =
+ rx_maxReceiveSize =
MIN(RX_MAX_PACKET_SIZE, maxmtu);
rx_maxReceiveSize =
MIN(rx_maxReceiveSize, rx_maxReceiveSizeUser);
AFS_GUNLOCK();
#if defined(AFS_HPUX102_ENV)
#if defined(AFS_HPUX110_ENV)
- /* we need a file associated with the socket so sosend in NetSend
+ /* we need a file associated with the socket so sosend in NetSend
* will not fail */
/* blocking socket */
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, 0, 0);
freeb(bindnam);
#else /* AFS_HPUX110_ENV */
#if defined(AFS_DARWIN80_ENV)
- {
+ {
int buflen = 50000;
int i,code2;
for (i=0;i<2;i++) {
if (asocket->so_fp) {
struct file *fp = asocket->so_fp;
#if !defined(AFS_HPUX1123_ENV)
- /* 11.23 still has falloc, but not FPENTRYFREE !
- * so for now if we shutdown, we will waist a file
+ /* 11.23 still has falloc, but not FPENTRYFREE !
+ * so for now if we shutdown, we will waist a file
* structure */
FPENTRYFREE(fp);
asocket->so_fp = NULL;
} else
tlen = rlen;
- /* add some padding to the last iovec, it's just to make sure that the
+ /* add some padding to the last iovec, it's just to make sure that the
* read doesn't return more data than we expect, and is done to get around
* our problems caused by the lack of a length field in the rx header. */
savelen = p->wirevec[p->niovecs - 1].iov_len;
return code;
}
-/* rxk_Listener()
+/* rxk_Listener()
*
* Listen for packets on socket. This thread is typically started after
* rx_Init has called rxi_StartListener(), but nevertheless, ensures that
vprintf(msg, ap);
va_end(ap);
# ifdef AFS_LINUX20_ENV
- * ((char *) 0) = 0;
+ * ((char *) 0) = 0;
# else
panic(msg);
# endif
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <unistd.h>
#endif
#ifdef AFS_NT40_ENV
-#ifndef EDQUOT
+#ifndef EDQUOT
#define EDQUOT WSAEDQUOT
#endif /* EDQUOT */
#endif /* AFS_NT40_ENV */
*/
/*
- * Convert from the local (host) to the standard
+ * Convert from the local (host) to the standard
* (network) system error code.
*/
int
char *
osi_alloc(afs_int32 x)
{
- /*
+ /*
* 0-length allocs may return NULL ptr from osi_kalloc, so we special-case
- * things so that NULL returned iff an error occurred
+ * things so that NULL returned iff an error occurred
*/
if (x == 0)
return (char *)&memZero;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/* Preconditions:
- * all packet buffers (iov_base) are integral multiples of
+ * all packet buffers (iov_base) are integral multiples of
* the word size.
* offset is an integral multiple of the word size.
*/
MUTEX_ENTER(&rx_freePktQ_lock);
#ifdef KERNEL
- for (; (num_pkts > 0) && (rxi_OverQuota2(class,num_pkts));
+ for (; (num_pkts > 0) && (rxi_OverQuota2(class,num_pkts));
num_pkts--, overq++);
if (overq) {
#endif /* KERNEL */
for (i=0, c=queue_First(&rx_freePacketQueue, rx_packet);
- i < num_pkts;
+ i < num_pkts;
i++, c=queue_Next(c, rx_packet)) {
RX_FPQ_MARK_USED(c);
}
#endif /* RX_ENABLE_TSFPQ */
/* this one is kind of awful.
- * In rxkad, the packet has been all shortened, and everything, ready for
+ * In rxkad, the packet has been all shortened, and everything, ready for
* sending. All of a sudden, we discover we need some of that space back.
* This isn't terribly general, because it knows that the packets are only
* rounded up to the EBS (userdata + security header).
RX_PACKET_IOV_INIT(p);
p->niovecs = 2;
RX_TS_FPQ_CHECKIN(rx_ts_info,p);
-
+
NETPRI;
MUTEX_ENTER(&rx_freePktQ_lock);
#ifdef RXDEBUG_PACKET
}
rx_ts_info->_FPQ.delta += apackets;
- if (flush_global &&
+ if (flush_global &&
(num_keep_local < apackets)) {
NETPRI;
MUTEX_ENTER(&rx_freePktQ_lock);
#ifdef RX_ENABLE_TSFPQ
RX_TS_INFO_GET(rx_ts_info);
RX_TS_FPQ_GLOBAL_ALLOC(rx_ts_info,apackets);
-#endif /* RX_ENABLE_TSFPQ */
+#endif /* RX_ENABLE_TSFPQ */
for (e = p + apackets; p < e; p++) {
RX_PACKET_IOV_INIT(p);
In any event, we assume the former, and append the packets to the end
of the free list. */
/* This explanation is bogus. The free list doesn't remain in any kind of
- useful order for afs_int32: the packets in use get pretty much randomly scattered
+ useful order for afs_int32: the packets in use get pretty much randomly scattered
across all the pages. In order to permit unused {packets,bufs} to page out, they
- must be stored so that packets which are adjacent in memory are adjacent in the
+ must be stored so that packets which are adjacent in memory are adjacent in the
free list. An array springs rapidly to mind.
*/
}
#endif /* RX_ENABLE_TSFPQ */
-/*
+/*
* free continuation buffers off a packet into a queue
*
* [IN] p -- packet from which continuation buffers will be freed
int rxi_nBadIovecs = 0;
-/* rxi_RestoreDataBufs
+/* rxi_RestoreDataBufs
*
* Restore the correct sizes to the iovecs. Called when reusing a packet
* for reading off the wire.
}
#endif /* RX_ENABLE_TSFPQ */
-/* rxi_AllocPacket sets up p->length so it reflects the number of
+/* rxi_AllocPacket sets up p->length so it reflects the number of
* bytes in the packet at this point, **not including** the header.
* The header is absolutely necessary, besides, this is the way the
* length field is usually used */
/* have to do this here because rx_FlushWrite fiddles with the iovs in
- * order to truncate outbound packets. In the near future, may need
+ * order to truncate outbound packets. In the near future, may need
* to allocate bufs from a static pool here, and/or in AllocSendPacket
*/
RX_PACKET_IOV_FULLINIT(p);
/* have to do this here because rx_FlushWrite fiddles with the iovs in
- * order to truncate outbound packets. In the near future, may need
+ * order to truncate outbound packets. In the near future, may need
* to allocate bufs from a static pool here, and/or in AllocSendPacket
*/
RX_PACKET_IOV_FULLINIT(p);
dpf(("Alloc %"AFS_PTR_FMT", class %d\n", p, class));
/* have to do this here because rx_FlushWrite fiddles with the iovs in
- * order to truncate outbound packets. In the near future, may need
+ * order to truncate outbound packets. In the near future, may need
* to allocate bufs from a static pool here, and/or in AllocSendPacket
*/
RX_PACKET_IOV_FULLINIT(p);
}
#ifndef KERNEL
-#ifdef AFS_NT40_ENV
+#ifdef AFS_NT40_ENV
/* Windows does not use file descriptors. */
#define CountFDs(amax) 0
#else
} else
tlen = rlen;
- /* Extend the last iovec for padding, it's just to make sure that the
+ /* Extend the last iovec for padding, it's just to make sure that the
* read doesn't return more data than we expect, and is done to get around
* our problems caused by the lack of a length field in the rx header.
* Use the extra buffer that follows the localdata in each packet
ntohs(from.sin_port), nbytes));
}
return 0;
- }
+ }
#ifdef RXDEBUG
else if ((rx_intentionallyDroppedOnReadPer100 > 0)
&& (random() % 100 < rx_intentionallyDroppedOnReadPer100)) {
*port = from.sin_port;
dpf(("Dropped %d %s: %x.%u.%u.%u.%u.%u.%u flags %d len %d",
- p->header.serial, rx_packetTypes[p->header.type - 1], ntohl(*host), ntohs(*port), p->header.serial,
- p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.flags,
+ p->header.serial, rx_packetTypes[p->header.type - 1], ntohl(*host), ntohs(*port), p->header.serial,
+ p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.flags,
p->length));
#ifdef RX_TRIMDATABUFS
rxi_TrimDataBufs(p, 1);
#endif
return 0;
- }
+ }
#endif
else {
/* Extract packet header. */
rx_MutexIncrement(rx_stats.packetsRead[p->header.type - 1], rx_stats_mutex);
/*
* Try to look up this peer structure. If it doesn't exist,
- * don't create a new one -
+ * don't create a new one -
* we don't keep count of the bytes sent/received if a peer
* structure doesn't already exist.
*
#ifdef RX_TRIMDATABUFS
/* Free any empty packet buffers at the end of this packet */
rxi_TrimDataBufs(p, 1);
-#endif
+#endif
return 1;
}
}
}
/* MTUXXX Supposed to skip <off> bytes and copy <len> bytes,
- * but it doesn't really.
- * This sucks, anyway, do it like m_cpy.... below
+ * but it doesn't really.
+ * This sucks, anyway, do it like m_cpy.... below
*/
static int
cpytoiovec(mblk_t * mp, int off, int len, struct iovec *iovs,
}
rx_packetread(ap, 0, sizeof(struct rx_debugIn), (char *)&tin);
- /* all done with packet, now set length to the truth, so we can
+ /* all done with packet, now set length to the truth, so we can
* reuse this packet */
rx_computelen(ap, ap->length);
#endif
#endif
MUTEX_ENTER(&rx_connHashTable_lock);
- /* We might be slightly out of step since we are not
+ /* We might be slightly out of step since we are not
* locking each call, but this is only debugging output.
*/
for (tc = rx_connHashTable[i]; tc; tc = tc->next) {
}
}
MUTEX_EXIT(&conn->conn_data_lock);
- /* This is so we can adjust retransmit time-outs better in the face of
+ /* This is so we can adjust retransmit time-outs better in the face of
* rapidly changing round-trip times. RTO estimation is not a la Karn.
*/
if (p->firstSerial == 0) {
#endif
/* Get network byte order header */
- rxi_EncodePacketHeader(p); /* XXX in the event of rexmit, etc, don't need to
+ rxi_EncodePacketHeader(p); /* XXX in the event of rexmit, etc, don't need to
* touch ALL the fields */
/* Send the packet out on the same socket that related packets are being
clock_Addmsec(&(p->retryTime),
10 + (((afs_uint32) p->backoff) << 8));
/* Some systems are nice and tell us right away that we cannot
- * reach this recipient by returning an error code.
+ * reach this recipient by returning an error code.
* So, when this happens let's "down" the host NOW so
* we don't sit around waiting for this host to timeout later.
*/
- if (call &&
+ if (call &&
#ifdef AFS_NT40_ENV
(code == -1 && WSAGetLastError() == WSAEHOSTUNREACH) || (code == -WSAEHOSTUNREACH)
#elif defined(AFS_LINUX20_ENV)
/* Pre-increment, to guarantee no zero serial number; a zero
* serial number means the packet was never sent. */
p->header.serial = ++serial;
- /* This is so we can adjust retransmit time-outs better in the face of
+ /* This is so we can adjust retransmit time-outs better in the face of
* rapidly changing round-trip times. RTO estimation is not a la Karn.
*/
if (p->firstSerial == 0) {
#endif
/* Get network byte order header */
- rxi_EncodePacketHeader(p); /* XXX in the event of rexmit, etc, don't need to
+ rxi_EncodePacketHeader(p); /* XXX in the event of rexmit, etc, don't need to
* touch ALL the fields */
}
10 + (((afs_uint32) p->backoff) << 8));
}
/* Some systems are nice and tell us right away that we cannot
- * reach this recipient by returning an error code.
+ * reach this recipient by returning an error code.
* So, when this happens let's "down" the host NOW so
* we don't sit around waiting for this host to timeout later.
*/
- if (call &&
+ if (call &&
#ifdef AFS_NT40_ENV
(code == -1 && WSAGetLastError() == WSAEHOSTUNREACH) || (code == -WSAEHOSTUNREACH)
#elif defined(AFS_LINUX20_ENV)
}
#ifndef KERNEL
-/*
+/*
* This function can be used by the Windows Cache Manager
* to dump the list of all rx packets so that we can determine
* where the packet leakage is.
for (p = rx_mallocedP; p; p = p->allNextp) {
RXDPRINTF(RXDPRINTOUT, "%s - packet=0x%p, id=%u, firstSent=%u.%08u, timeSent=%u.%08u, retryTime=%u.%08u, firstSerial=%u, niovecs=%u, flags=0x%x, backoff=%u, length=%u header: epoch=%u, cid=%u, callNum=%u, seq=%u, serial=%u, type=%u, flags=0x%x, userStatus=%u, securityIndex=%u, serviceId=%u\r\n",
- cookie, p, p->packetId, p->firstSent.sec, p->firstSent.usec, p->timeSent.sec, p->timeSent.usec, p->retryTime.sec, p->retryTime.usec,
+ cookie, p, p->packetId, p->firstSent.sec, p->firstSent.usec, p->timeSent.sec, p->timeSent.usec, p->retryTime.sec, p->retryTime.usec,
p->firstSerial, p->niovecs, (afs_uint32)p->flags, (afs_uint32)p->backoff, (afs_uint32)p->length,
p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.serial,
- (afs_uint32)p->header.type, (afs_uint32)p->header.flags, (afs_uint32)p->header.userStatus,
+ (afs_uint32)p->header.type, (afs_uint32)p->header.flags, (afs_uint32)p->header.userStatus,
(afs_uint32)p->header.securityIndex, (afs_uint32)p->header.serviceId);
#ifdef AFS_NT40_ENV
WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef _RX_PACKET_
#define _RX_PACKET_
-#if defined(AFS_NT40_ENV)
+#if defined(AFS_NT40_ENV)
#include "rx_xmit_nt.h"
#endif
#ifndef AFS_NT40_ENV
/* this file includes the macros and decls which depend on packet
* format, and related packet manipulation macros. Note that code
* which runs at NETPRI should not sleep, or AIX will panic */
-/* There are some assumptions that various code makes -- I'll try to
- * express them all here:
+/* There are some assumptions that various code makes -- I'll try to
+ * express them all here:
* 1. rx_ReceiveAckPacket assumes that it can get an entire ack
* contiguous in the first iovec. As a result, the iovec buffers must
* be >= sizeof (struct rx_ackpacket)
*/
-#if defined(AFS_NT40_ENV)
+#if defined(AFS_NT40_ENV)
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
#define _RX_IPUDP_SIZE (RX_IP_SIZE + UDP_HDR_SIZE)
/* REMOTE_PACKET_SIZE is currently the same as local. This is because REMOTE
- * is defined much too generally for my tastes, and includes the case of
- * multiple class C nets connected with a router within one campus or MAN.
+ * is defined much too generally for my tastes, and includes the case of
+ * multiple class C nets connected with a router within one campus or MAN.
* I don't want to make local performance suffer just because of some
* out-dated protocol that used to be in use on the NSFANET that's
* practically unused anymore. Any modern IP implementation will be
* size will be larger than that. */
#ifdef notdef
-/* some sample MTUs
- 4352 what FDDI(RFC1188) uses... Larger?
- 4096 VJ's recommendation for FDDI
- 17914 what IBM 16MB TR uses
- 8166 IEEE 802.4
+/* some sample MTUs
+ 4352 what FDDI(RFC1188) uses... Larger?
+ 4096 VJ's recommendation for FDDI
+ 17914 what IBM 16MB TR uses
+ 8166 IEEE 802.4
4464 IEEE 802.5 MAX
- 2002 IEEE 802.5 Recommended
- 1500 what Ethernet uses
+ 2002 IEEE 802.5 Recommended
+ 1500 what Ethernet uses
1492 what 802.3 uses ( 8 bytes for 802.2 SAP )
9180 Classical IP over ATM (RFC2225)
*/
#define RX_JUMBOBUFFERSIZE 1412
#define RX_JUMBOHEADERSIZE 4
/*
- * RX_FIRSTBUFFERSIZE must be larger than the largest ack packet,
- * the largest possible challenge or response packet.
+ * RX_FIRSTBUFFERSIZE must be larger than the largest ack packet,
+ * the largest possible challenge or response packet.
* Both Firstbuffersize and cbuffersize must be integral multiples of 8,
* so the security header and trailer stuff works for rxkad_crypt. yuck.
*/
* The Linux port uses this knowledge as well in osi_NetSend.
*
* The extradata field is padding in case the recvmsg implementation
- * writes beyond the end of the final iovec buffer. We do not know
+ * writes beyond the end of the final iovec buffer. We do not know
* what platforms had this problem so we are reluctant to remove it.
* the extradata must be adjacent to localdata.
* See rxk_ReadPacket and rxi_ReadPacket.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32(*serviceProc) (struct
rx_call *
acall));
-extern struct rx_service *rx_NewServiceHost(afs_uint32 host, u_short port,
+extern struct rx_service *rx_NewServiceHost(afs_uint32 host, u_short port,
u_short serviceId,
char *serviceName,
struct rx_securityClass
extern void rxi_StartUnlocked(struct rxevent *event,
void *call, /* struct rx_call */
void *arg1, int istack);
-extern void rxi_Start(struct rxevent *event,
+extern void rxi_Start(struct rxevent *event,
void *call, /* struct rx_call */
void *arg1, int istack);
extern void rxi_Send(struct rx_call *call,
extern int rxi_CheckCall(struct rx_call *call);
#endif /* RX_ENABLE_LOCKS */
extern void rxi_KeepAliveEvent(struct rxevent *event,
- void *call /* struct rx_call *call */,
+ void *call /* struct rx_call *call */,
void *dummy);
extern void rxi_GrowMTUEvent(struct rxevent *event,
void *call /* struct rx_call *call */,
extern void rxi_ComputeRoundTripTime(struct rx_packet *p,
struct clock *sentp,
struct rx_peer *peer);
-extern void rxi_ReapConnections(struct rxevent *unused, void *unused1,
+extern void rxi_ReapConnections(struct rxevent *unused, void *unused1,
void *unused2);
extern int rxs_Release(struct rx_securityClass *aobj);
#ifndef KERNEL
/* this func seems to be called with tons of different style routines, need to look
at another time. */
#else
-extern struct rxevent *rxevent_Post(struct clock *when,
+extern struct rxevent *rxevent_Post(struct clock *when,
void (*func) (struct rxevent *, void *, void *),
void *arg, void *arg1);
-extern struct rxevent *rxevent_Post2(struct clock *when,
+extern struct rxevent *rxevent_Post2(struct clock *when,
void (*func) (struct rxevent *, void *, void *, int),
void *arg, void *arg1, int arg2);
extern struct rxevent *rxevent_PostNow(struct clock *when, struct clock *now,
void (*func) (struct rxevent *, void *, void *), void *arg, void *arg1);
extern struct rxevent *rxevent_PostNow2(struct clock *when, struct clock *now,
- void (*func) (struct rxevent *, void *, void *, int), void *arg,
+ void (*func) (struct rxevent *, void *, void *, int), void *arg,
void *arg1, int arg2);
#endif
extern void shutdown_rxevent(void);
extern void rxi_setaddr(afs_uint32 x);
extern afs_uint32 rxi_getaddr(void);
extern int rx_getAllAddr(afs_uint32 * buffer, int maxSize);
-extern int rx_getAllAddrMaskMtu(afs_uint32 addrBuffer[],
+extern int rx_getAllAddrMaskMtu(afs_uint32 addrBuffer[],
afs_uint32 maskBuffer[],
afs_uint32 mtuBuffer[],
int maxSize);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
error = CV_TIMEDWAIT(&rx_event_handler_cond, &event_handler_mutex, &rx_pthread_next_event_time);
if (error == 0) {
rx_pthread_n_event_woken++;
- }
-#ifdef AFS_NT40_ENV
+ }
+#ifdef AFS_NT40_ENV
else if (error == ETIMEDOUT) {
rx_pthread_n_event_expired++;
} else {
/* threadID is used for making decisions in GetCall. Get it by bumping
* number of threads handling incoming calls */
/* Unique thread ID: used for scheduling purposes *and* as index into
- * the host hold table (fileserver).
+ * the host hold table (fileserver).
* The previously used rxi_availProcs is unsuitable as it
* will already go up and down as packets arrive while the server
* threads are still initialising! The recently introduced
* listener processes (one for each socket); these are started by GetUdpSocket.
*
* The event handling process *is* started here (the old listener used
- * to also handle events). The listener threads can't actually start
+ * to also handle events). The listener threads can't actually start
* listening until rxi_StartListener is called because most of R may not
* be initialized when rxi_Listen is called.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
((((q2->a->b=q1)->a->b=q2->b)->a=q1->a, q1->a=q2->a), queue_Init(q2))
/* This one removes part of queue (*q1) and attaches it to queue (*q2).
- * If (a,b) is (next,prev) then the subchain is prepended to (*q2),
+ * If (a,b) is (next,prev) then the subchain is prepended to (*q2),
* otherwise the subchain is appended to (*q2).
* If (c,d) is (prev,next) then the subchain is the elements in (*q1) before (i),
* otherwise the subchain is the elements in (*q1) after (i).
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "h/types.h"
#include "h/time.h"
#include "h/stat.h"
-#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
#include "h/systm.h"
#endif
#ifdef AFS_OSF_ENV
if ((error =
RXS_CheckPacket(conn->securityObject, call,
rp))) {
- /* Used to merely shut down the call, but now we
- * shut down the whole connection since this may
+ /* Used to merely shut down the call, but now we
+ * shut down the whole connection since this may
* indicate an attempt to hijack it */
MUTEX_EXIT(&call->lock);
cp = call->currentPacket = rp;
call->currentPacket->flags |= RX_PKTFLAG_CP;
call->curvec = 1; /* 0th vec is always header */
- /* begin at the beginning [ more or less ], continue
+ /* begin at the beginning [ more or less ], continue
* on until the end, then stop. */
call->curpos =
(char *)cp->wirevec[1].iov_base +
}
}
- /*
+ /*
* If we reach this point either we have no packets in the
* receive queue or the next packet in the queue is not the
* one we are looking for. There is nothing else for us to
* data + the header. */
if ((error =
RXS_CheckPacket(conn->securityObject, call, rp))) {
- /* Used to merely shut down the call, but now we
- * shut down the whole connection since this may
+ /* Used to merely shut down the call, but now we
+ * shut down the whole connection since this may
* indicate an attempt to hijack it */
MUTEX_EXIT(&call->lock);
call->currentPacket->flags |= RX_PKTFLAG_CP;
call->curvec = 1; /* 0th vec is always header */
cur_iov = &curp->wirevec[1];
- /* begin at the beginning [ more or less ], continue
+ /* begin at the beginning [ more or less ], continue
* on until the end, then stop. */
call->curpos =
(char *)curp->wirevec[1].iov_base +
if (call->nFree == 0) {
if (!call->error && cp) {
/* Clear the current packet now so that if
- * we are forced to wait and drop the lock
- * the packet we are planning on using
+ * we are forced to wait and drop the lock
+ * the packet we are planning on using
* cannot be freed.
*/
cp->flags &= ~RX_PKTFLAG_CP;
}
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
clock_NewTime(); /* Bogus: need new time package */
- /* The 0, below, specifies that it is not the last packet:
+ /* The 0, below, specifies that it is not the last packet:
* there will be others. PrepareSendPacket may
* alter the packet length by up to
* conn->securityMaxTrailerSize */
call->currentPacket = cp;
call->nFree = cp->length;
call->curvec = 1; /* 0th vec is always header */
- /* begin at the beginning [ more or less ], continue
+ /* begin at the beginning [ more or less ], continue
* on until the end, then stop. */
call->curpos =
(char *)cp->wirevec[1].iov_base +
do {
if (call->nFree == 0 && cp) {
clock_NewTime(); /* Bogus: need new time package */
- /* The 0, below, specifies that it is not the last packet:
+ /* The 0, below, specifies that it is not the last packet:
* there will be others. PrepareSendPacket may
* alter the packet length by up to
* conn->securityMaxTrailerSize */
/* Move the packets from the temporary queue onto the transmit queue.
* We may end up with more than call->twind packets on the queue. */
-
+
for (queue_Scan(&tmpq, p, np, rx_packet))
{
p->flags |= RX_PKTFLAG_TQ;
if (cp) {
/* cp->length is only supposed to be the user's data */
- /* cp->length was already set to (then-current)
+ /* cp->length was already set to (then-current)
* MaxUserDataSize or less. */
cp->flags &= ~RX_PKTFLAG_CP;
cp->length -= call->nFree;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# include <unistd.h>
#endif
# include <fcntl.h>
-#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
# include <sys/syscall.h>
#endif
#include <afs/afs_args.h>
* Make a socket for receiving/sending IP packets. Set it into non-blocking
* and large buffering modes. If port isn't specified, the kernel will pick
* one. Returns the socket (>= 0) on success. Returns OSI_NULLSOCKET on
- * failure. Port must be in network byte order.
+ * failure. Port must be in network byte order.
*/
osi_socket
rxi_GetHostUDPSocket(u_int ahost, u_short port)
#endif
#endif
-#if !defined(AFS_NT40_ENV)
+#if !defined(AFS_NT40_ENV)
if (ntohs(port) >= IPPORT_RESERVED && ntohs(port) < IPPORT_USERRESERVED) {
/* (osi_Msg "%s*WARNING* port number %d is not a reserved port number. Use port numbers above %d\n", name, port, IPPORT_USERRESERVED);
*/ ;
(osi_Msg "%sbind failed\n", name);
goto error;
}
-#if !defined(AFS_NT40_ENV)
+#if !defined(AFS_NT40_ENV)
/*
- * Set close-on-exec on rx socket
+ * Set close-on-exec on rx socket
*/
fcntl(socketFd, F_SETFD, 1);
#endif
len2 /= 2;
}
- /* but do not let it get smaller than 32K */
+ /* but do not let it get smaller than 32K */
if (len2 < len1)
len2 = len1;
void *
osi_Alloc(afs_int32 x)
{
- /*
+ /*
* 0-length allocs may return NULL ptr from malloc, so we special-case
- * things so that NULL returned iff an error occurred
+ * things so that NULL returned iff an error occurred
*/
if (x == 0)
return (void *)&memZero;
static u_int rxi_numNetAddrs;
static int Inited = 0;
-#if defined(AFS_NT40_ENV)
+#if defined(AFS_NT40_ENV)
int
rxi_getaddr(void)
{
/* we don't want to use the loopback adapter which is first */
/* this is a bad bad hack */
if (rxi_numNetAddrs > 1)
- return htonl(rxi_NetAddrs[1]);
+ return htonl(rxi_NetAddrs[1]);
else if (rxi_numNetAddrs > 0)
return htonl(rxi_NetAddrs[0]);
else
return 0;
}
-/*
-** return number of addresses
+/*
+** return number of addresses
** and the addresses themselves in the buffer
** maxSize - max number of interfaces to return.
*/
/* The IP address list can change so we must query for it */
rx_GetIFInfo();
- for (count = 0;
+ for (count = 0;
offset < rxi_numNetAddrs && maxSize > 0;
count++, offset++, maxSize--) {
addrBuffer[count] = htonl(rxi_NetAddrs[offset]);
#ifdef AFS_NT40_ENV
extern int rxinit_status;
-void
+void
rxi_InitMorePackets(void) {
int npackets, ncbufs;
-#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV)
int
rxi_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
{
if (ifr->ifr_flags & IFF_LOOPBACK)
continue;
#endif
- /* fprintf(stderr, "if %s flags=%x\n",
+ /* fprintf(stderr, "if %s flags=%x\n",
* ifr->ifr_name, ifr->ifr_flags); */
} else { /*
* fputs(stderr, "ioctl error IFFLAGS\n");
rxi_syscallp = rxi_syscall;
#endif
- /* If I refer to kernel extensions that aren't loaded on AIX, the
- * program refuses to load and run, so I simply can't include the
+ /* If I refer to kernel extensions that aren't loaded on AIX, the
+ * program refuses to load and run, so I simply can't include the
* following code. Fortunately, AIX is the one operating system in
* which the subsequent ioctl works reliably. */
if (rxi_syscallp) {
} else
myNetMasks[rxi_numNetAddrs] =
ntohl(myNetMasks[rxi_numNetAddrs]);
- /* fprintf(stderr, "if %s mask=0x%x\n",
+ /* fprintf(stderr, "if %s mask=0x%x\n",
* ifr->ifr_name, myNetMasks[rxi_numNetAddrs]); */
}
res = ioctl(s, SIOCGIFMTU, ifr);
if ((res == 0) && (ifr->ifr_metric > 128)) { /* sanity check */
myNetMTUs[rxi_numNetAddrs] = ifr->ifr_metric;
- /* fprintf(stderr, "if %s mtu=%d\n",
+ /* fprintf(stderr, "if %s mtu=%d\n",
* ifr->ifr_name, ifr->ifr_metric); */
} else {
/* fputs(stderr, "ioctl error IFMTU\n");
if ((res == 0)) {
a = (struct sockaddr_in *)&ifr->ifr_addr;
myNetMasks[rxi_numNetAddrs] = ntohl(a->sin_addr.s_addr);
- /* fprintf(stderr, "if %s subnetmask=0x%x\n",
+ /* fprintf(stderr, "if %s subnetmask=0x%x\n",
* ifr->ifr_name, myNetMasks[rxi_numNetAddrs]); */
} else {
/* fputs(stderr, "ioctl error IFMASK\n");
pp->ifMTU = 0;
pp->timeout.sec = 2;
pp->rateFlag = 2; /* start timing after two full packets */
- /* I don't initialize these, because I presume they are bzero'd...
+ /* I don't initialize these, because I presume they are bzero'd...
* pp->burstSize pp->burst pp->burstWait.sec pp->burstWait.usec
* pp->timeout.usec */
rxi_nSendFrags = rxi_nRecvFrags = 1;
}
-/* Override max MTU. If rx_SetNoJumbo is called, it must be
+/* Override max MTU. If rx_SetNoJumbo is called, it must be
called before calling rx_SetMaxMTU since SetNoJumbo clobbers rx_maxReceiveSize */
void
rx_SetMaxMTU(int mtu)
goto out;
ret=1;
err =(struct sock_extended_err *) CMSG_DATA(cmsg);
-
+
if (err->ee_errno == EMSGSIZE && err->ee_info >= 68) {
rxi_SetPeerMtu(NULL, addr.sin_addr.s_addr, addr.sin_port,
err->ee_info - RX_IPUDP_SIZE);
}
/* other DEST_UNREACH's and TIME_EXCEEDED should be dealt with too */
-
+
out:
#endif
return ret;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <errno.h>
-/*
+/*
* WSASendMsg is only supported on Vista and above
* Neither function is part of the public WinSock API
- * and therefore the function pointers must be
+ * and therefore the function pointers must be
* obtained via WSAIoctl()
*/
static LPFN_WSARECVMSG pWSARecvMsg = NULL;
rc = WSAIoctl( s, SIO_GET_EXTENSION_FUNCTION_POINTER,
&WSARecvMsg_GUID, sizeof(WSARecvMsg_GUID),
&pWSARecvMsg, sizeof(pWSARecvMsg),
- &NumberOfBytes, NULL, NULL);
+ &NumberOfBytes, NULL, NULL);
rc = WSAIoctl( s, SIO_GET_EXTENSION_FUNCTION_POINTER,
&WSASendMsg_GUID, sizeof(WSASendMsg_GUID),
&pWSASendMsg, sizeof(pWSASendMsg),
- &NumberOfBytes, NULL, NULL);
+ &NumberOfBytes, NULL, NULL);
/* Turn on UDP PORT_UNREACHABLE messages */
dwIn = 1;
- rc = WSAIoctl( s, SIO_UDP_CONNRESET,
+ rc = WSAIoctl( s, SIO_UDP_CONNRESET,
&dwIn, sizeof(dwIn),
&dwOut, sizeof(dwOut),
- &NumberOfBytes, NULL, NULL);
+ &NumberOfBytes, NULL, NULL);
/* Turn on UDP CIRCULAR QUEUEING messages */
dwIn = 1;
wsaMsg.dwFlags = flags;
code = pWSARecvMsg(socket, &wsaMsg, &dwBytes, NULL, NULL);
- if (code == 0) {
+ if (code == 0) {
/* success - return the number of bytes read */
code = (int)dwBytes;
} else {
wsaMsg.dwFlags = 0;
code = pWSASendMsg(socket, &wsaMsg, flags, &dwBytes, NULL, NULL);
- if (code == 0) {
+ if (code == 0) {
/* success - return the number of bytes read */
code = (int)dwBytes;
} else {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 2000 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution
* at such time that OpenAFS documentation is written.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#include <afsconfig.h>
-/*
+/*
nn * We are using getopt since we want it to be possible to link to
* transarc libs.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define FATAL( y ) {fprintf(stderr, y); exit(1);}
/* for vary/conf array for testing pusrposes we will assume a
-high index of at least 5, so IDL_FIX_ARRAY_SIZE should never be
+high index of at least 5, so IDL_FIX_ARRAY_SIZE should never be
smaller than MIN_HIGH */
#define MIN_HIGH 2
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
return (FALSE);
}
-/*
- * Wrapper for xdr_string that can be called directly from
+/*
+ * Wrapper for xdr_string that can be called directly from
* routines like clnt_call
*/
#ifndef KERNEL
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* bool_t (*xdrproc_t)(XDR *, caddr_t *);
*/
-/* We need a different prototype for i386 Linux kernel code, because it
+/* We need a different prototype for i386 Linux kernel code, because it
* uses a register (rather than stack) based calling convention. The
* normal va_args prototype results in the arguments being placed on the
* stack, where they aren't accessible to the 'real' function.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* elsize is the size (in bytes) of each element, and elproc is the
* xdr procedure to call to handle each element of the array.
*/
-/*
+/*
caddr_t *addrp; * array pointer *
u_int *sizep; * number of elements *
u_int maxsize; * max numberof elements *
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
/*
* The procedure xdrmem_create initializes a stream descriptor for a
- * memory buffer.
+ * memory buffer.
*/
void
xdrmem_create(XDR * xdrs, caddr_t addr, u_int size, enum xdr_op op)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* xdr_refernce.c */
-extern bool_t xdr_reference(XDR *xdrs, caddr_t *pp, u_int size,
+extern bool_t xdr_reference(XDR *xdrs, caddr_t *pp, u_int size,
xdrproc_t proc);
/* xdr_stdio.c */
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* by n bytes of data, where n is contained in the header. The header
* is represented as a htonl(afs_uint32). Thegh order bit encodes
* whether or not the fragment is the last fragment of the record
- * (1 => fragment is last, 0 => more fragments to follow.
+ * (1 => fragment is last, 0 => more fragments to follow.
* The other 31 bits encode the byte length of the fragment.
*/
RECSTREAM *rstrm = (RECSTREAM *) osi_alloc(sizeof(RECSTREAM));
if (rstrm == NULL) {
- /*
- * This is bad. Should rework xdrrec_create to
+ /*
+ * This is bad. Should rework xdrrec_create to
* return a handle, and in this case return NULL
*/
return;
/*
* Look ahead fuction.
- * Returns TRUE iff there is no more input in the buffer
+ * Returns TRUE iff there is no more input in the buffer
* after consuming the rest of the current record.
*/
bool_t
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* proc is the routine to handle the referenced structure.
*/
bool_t
-xdr_reference(XDR *xdrs,
+xdr_reference(XDR *xdrs,
caddr_t *pp, /* the pointer to work on */
u_int size, /* size of the object pointed to */
xdrproc_t proc) /* xdr routine to handle the object */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
- * xdr_rx.c. XDR using RX.
+ * xdr_rx.c. XDR using RX.
*/
#include <afsconfig.h>
char *saddr = (char *)&l;
saddr -= STACK_TO_PIN;
/*
- * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
+ * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
* splnet (disables interrupts), which is set throughout rx, we can't swap in stack
* pages if we need so we panic. Since sometimes, under splnet, we'll use more than
* 2K stack we could try to bring the next few stack pages in here before we call the rx
char *saddr = (char *)&code;
saddr -= STACK_TO_PIN;
/*
- * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
+ * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
* splnet (disables interrupts), which is set throughout rx, we can't swap in stack
* pages if we need so we panic. Since sometimes, under splnet, we'll use more than
* 2K stack we could try to bring the next few stack pages in here before we call the rx
char *saddr = (char *)&code;
saddr -= STACK_TO_PIN;
/*
- * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
+ * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
* splnet (disables interrupts), which is set throughout rx, we can't swap in stack
* pages if we need so we panic. Since sometimes, under splnet, we'll use more than
* 2K stack we could try to bring the next few stack pages in here before we call the rx
char *saddr = (char *)&code;
saddr -= STACK_TO_PIN;
/*
- * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
+ * Hack of hacks: Aix3.2 only guarantees that the next 2K of stack in pinned. Under
* splnet (disables interrupts), which is set throughout rx, we can't swap in stack
* pages if we need so we panic. Since sometimes, under splnet, we'll use more than
* 2K stack we could try to bring the next few stack pages in here before we call the rx
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* }
*
* > objpp: Pointer to the pointer to the object.
- * > obj_size: size of the object.
+ * > obj_size: size of the object.
* > xdr_obj: routine to XDR an object.
- *
+ *
*/
bool_t
xdr_pointer(XDR * xdrs, char **objpp, u_int obj_size,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (withPackets)
printf("Free packets: %d/%d, packet reclaims: %d, calls: %d, used FDs: %d\n",
- tstats.nFreePackets, tstats.nPackets, tstats.packetReclaims,
+ tstats.nFreePackets, tstats.nPackets, tstats.packetReclaims,
tstats.callsExecuted, tstats.usedFDs);
else
printf("Free packets: %d, packet reclaims: %d, calls: %d, used FDs: %d\n",
/* now display the peer */
hostAddr.s_addr = tpeer.host;
afs_inet_ntoa_r(hostAddr.s_addr, hoststr);
- printf("Peer at host %s, port %hu\n", hoststr,
+ printf("Peer at host %s, port %hu\n", hoststr,
ntohs(tpeer.port));
printf("\tifMTU %hu\tnatMTU %hu\tmaxMTU %hu\n", tpeer.ifMTU,
tpeer.natMTU, tpeer.maxMTU);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_cout.c, XDR routine outputter for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_cout.c, XDR routine outputter for the RPC protocol compiler
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
#include <afsconfig.h>
#include <afs/param.h>
/*
- * Emit the C-routine for the given definition
+ * Emit the C-routine for the given definition
*/
void
emit(definition * def)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_hout.c, Header file outputter for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_hout.c, Header file outputter for the RPC protocol compiler
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
#include <afsconfig.h>
#include <afs/param.h>
static int undefined2(char *type, char *stop);
/*
- * Print the C-version of an xdr definition
+ * Print the C-version of an xdr definition
*/
void
print_datadef(definition * def)
(1 << DEF_INPARAM) | (1 << DEF_INOUTPARAM));
psproc1(defp, 1, "int", "End",
(1 << DEF_OUTPARAM) | (1 << DEF_INOUTPARAM));
- }
+ }
if (!(!multi_flag && split_flag))
psproc1(defp, 0, "int", "", 0xFFFFFFFF);
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_main.c, Top level of the RPC protocol compiler.
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_main.c, Top level of the RPC protocol compiler.
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
#include <afsconfig.h>
if (!CPP)
CPP = "cl /EP /C /nologo";
#endif /* AFS_NT40_ENV */
-
+
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
}
/*
- * add extension to filename
+ * add extension to filename
*/
static char *
extendfile(char *file, char *ext)
}
/*
- * Open output file with given extension
+ * Open output file with given extension
*/
static void
open_output(char *infile, char *outfile)
}
/*
- * Open input file with given define for C-preprocessor
+ * Open input file with given define for C-preprocessor
*/
static void
open_input(char *infile, char *define)
}
/*
- * Perform registrations for service output
+ * Perform registrations for service output
*/
static void
do_registers(int argc, char *argv[])
}
/*
- * Parse command line arguments
+ * Parse command line arguments
*/
static int
parseargs(int argc, char *argv[], struct commandline *cmd)
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_parse.c, Parser for the RPC protocol compiler
+ * rpc_parse.c, Parser for the RPC protocol compiler
* Copyright (C) 1987 Sun Microsystems, Inc.
*/
#include <afsconfig.h>
plist->pl.param_name);
}
} else {
- f_print(fout, ", %s", plist->pl.param_name);
+ f_print(fout, ", %s", plist->pl.param_name);
plist->pl.param_flag &= ~PROCESSED_PARAM;
}
}
f_print(fout, "\t\tif ((pass == 0) && (aclient->states[_ucount] & CFLastFailed)) {\n");
f_print(fout, "\t\t\tcontinue; /* this guy's down */\n");
f_print(fout, "\t\t}\n");
-
+
f_print(fout, "\t\trcode = %s%s%s(tc\n", prefix, PackagePrefix[PackageIndex], defp->pc.proc_name);
for (plist = defp->pc.plists; plist; plist = plist->next) {
if (plist->component_kind == DEF_PARAM) {
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_parse.h, Definitions for the RPCL parser
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_parse.h, Definitions for the RPCL parser
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
enum defkind {
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_scan.c, Scanner for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_scan.c, Scanner for the RPC protocol compiler
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
/* Portions Copyright (c) 2003 Apple Computer, Inc. */
/*
- * scan expecting 1 given token
+ * scan expecting 1 given token
*/
void
scan(tok_kind expect, token * tokp)
}
/*
- * scan expecting 2 given tokens
+ * scan expecting 2 given tokens
*/
void
scan2(tok_kind expect1, tok_kind expect2, token * tokp)
}
/*
- * scan expecting 3 given token
+ * scan expecting 3 given token
*/
void
scan3(tok_kind expect1, tok_kind expect2, tok_kind expect3, token * tokp)
}
/*
- * scan expecting a constant, possibly symbolic
+ * scan expecting a constant, possibly symbolic
*/
void
scan_num(token * tokp)
/*
- * Peek at the next token
+ * Peek at the next token
*/
void
peek(token * tokp)
/*
- * Peek at the next token and scan it if it matches what you expect
+ * Peek at the next token and scan it if it matches what you expect
*/
int
peekscan(tok_kind expect, token * tokp)
/*
- * Get the next token, printing out any directive that are encountered.
+ * Get the next token, printing out any directive that are encountered.
*/
void
get_token(token * tokp)
}
/*
- * 'where' is not whitespace, comment or directive Must be a token!
+ * 'where' is not whitespace, comment or directive Must be a token!
*/
switch (*where) {
case ':':
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_scan.h, Definitions for the RPCL scanner
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_scan.h, Definitions for the RPCL scanner
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
/*
- * kinds of tokens
+ * kinds of tokens
*/
enum tok_kind {
TOK_IDENT,
typedef enum tok_kind tok_kind;
/*
- * a token
+ * a token
*/
struct token {
tok_kind kind;
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
/*
* rpc_svcout.c, Server-skeleton outputter for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsytsems, Inc.
+ * Copyright (C) 1987, Sun Microsytsems, Inc.
*/
#include <afsconfig.h>
#include <afs/param.h>
/*
- * write most of the service, that is, everything but the registrations.
+ * write most of the service, that is, everything but the registrations.
*/
void
write_most(void)
/*
- * write a registration for the given transport
+ * write a registration for the given transport
*/
void
write_register(char *transp)
/*
- * write the rest of the service
+ * write the rest of the service
*/
void
write_rest(void)
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_util.c, Utility routines for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_util.c, Utility routines for the RPC protocol compiler
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
#include <afsconfig.h>
#include <afs/param.h>
/*
- * Reinitialize the world
+ * Reinitialize the world
*/
void
reinitialize(void)
}
/*
- * string equality
+ * string equality
*/
int
streq(char *a, char *b)
}
/*
- * find a value in a list
+ * find a value in a list
*/
char *
findval(list * lst, char *val, int (*cmp) (definition * def, char *type))
}
/*
- * store a value in a list
+ * store a value in a list
*/
void
storeval(list ** lstp, char *val)
/*
- * print a useful (?) error message, and then die
+ * print a useful (?) error message, and then die
*/
void
error(char *msg)
/*
* Something went wrong, unlink any files that we may have created and then
- * die.
+ * die.
*/
void
crash(void)
static char expectbuf[100];
/*
- * error, token encountered was not the expected one
+ * error, token encountered was not the expected one
*/
void
expected1(tok_kind exp1)
}
/*
- * error, token encountered was not one of two expected ones
+ * error, token encountered was not one of two expected ones
*/
void
expected2(tok_kind exp1, tok_kind exp2)
}
/*
- * error, token encountered was not one of 3 expected ones
+ * error, token encountered was not one of 3 expected ones
*/
void
expected3(tok_kind exp1, tok_kind exp2, tok_kind exp3)
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
- *
+ *
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
+ *
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
- *
+ *
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
- *
+ *
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
- *
+ *
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
/*
- * rpc_util.h, Useful definitions for the RPC protocol compiler
- * Copyright (C) 1987, Sun Microsystems, Inc.
+ * rpc_util.h, Useful definitions for the RPC protocol compiler
+ * Copyright (C) 1987, Sun Microsystems, Inc.
*/
#include "rxgen_consts.h"
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
* Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * 3. Neither the name of the Institute nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*/
/* RCSID("$Heimdal: crc.c,v 1.9 2000/08/03 01:45:14 assar Exp $"); */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
ADD_RXKAD_STATS(bytesEncrypted[rxkad_TypeIndex(tp->type)],len);
/*
* afs_int32 cksum;
- * cksum = htonl(0);
+ * cksum = htonl(0);
* * Future option to add cksum here, but for now we just put 0
*/
rx_PutInt32(packet, 1 * sizeof(afs_int32), 0);
* Copyright (c) 1995 - 2000, 2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef KERNEL
#ifndef UKERNEL
#include "afs/stds.h"
-#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
#include "h/systm.h"
#endif
#include "h/types.h"
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright (c) 1999 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
*
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of KTH nor the names of its contributors may be
* used to endorse or promote products derived from this software without
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define MAXKTCREALMLEN 64 /* should be 256 */
#define KTC_TIME_UNCERTAINTY (15*60) /* max skew bet. machines' clocks */
-#define MAXRANDOMNAMELEN 16 /* length of random generated
- * usernames used by afslog for high
+#define MAXRANDOMNAMELEN 16 /* length of random generated
+ * usernames used by afslog for high
* security must be < MAXKTCNAMELEN && < MAXSMBNAMELEN */
#define MAXSMBNAMELEN 256 /* max length of an SMB name */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef UKERNEL
#include "afs/stds.h"
#include "afs/afs_osi.h"
-#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+#if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
#include "h/systm.h"
#endif
#if defined(AFS_DARWIN_ENV) || defined(AFS_OBSD_ENV)
pthread_key_t rxkad_stats_key;
#else /* AFS_PTHREAD_ENV */
#if defined(KERNEL) && !defined(UKERNEL)
-struct rxkad_stats rxkad_stats = { { 0 } };
+struct rxkad_stats rxkad_stats = { { 0 } };
#else
/* Move delaration of this to des/key_sched.c */
#endif
memset(&rxkad_global_stats, 0, sizeof(rxkad_global_stats));
}
-rxkad_stats_t *
+rxkad_stats_t *
rxkad_thr_stats_init(void) {
rxkad_stats_t * rxkad_stats;
rxkad_stats = (rxkad_stats_t *)malloc(sizeof(rxkad_stats_t));
rx_SetSecurityMaxTrailerSize(conn, 4);
} else if (level == rxkad_crypt) {
rx_SetSecurityHeaderSize(conn, 8);
- rx_SetSecurityMaxTrailerSize(conn, 8); /* XXX was 7, but why screw with
+ rx_SetSecurityMaxTrailerSize(conn, 8); /* XXX was 7, but why screw with
* unaligned accesses? */
}
}
return RXKADSEALEDINCON;
nlen = word & 0xffff; /* get real user data length */
- /* The sealed length should be no larger than the initial length, since the
+ /* The sealed length should be no larger than the initial length, since the
* reverse (round-up) occurs in ...PreparePacket */
if (nlen > len)
return RXKADDATALEN;
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int (*get_key)
-
+
(void
*get_key_rock,
int kvno,
int (*user_ok)
-
+
(char *name,
char
*instance,
char *instance, char *cell,
afs_int32 * kvno);
extern afs_int32 rxkad_SetConfiguration(struct rx_securityClass *aobj,
- struct rx_connection *aconn,
+ struct rx_connection *aconn,
rx_securityConfigVariables atype,
void * avalue, void **aresult);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afs/stds.h>
#include <sys/types.h>
-#if (defined(AFS_AIX_ENV) && defined(KERNEL) && !defined(UKERNEL)) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+#if (defined(AFS_AIX_ENV) && defined(KERNEL) && !defined(UKERNEL)) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
#include <sys/systm.h>
#endif
#include <time.h>
* Currently only used by the AFS/DFS protocol translator to recognize
* Kerberos V5 tickets. The actual code to do that is provided externally.
*/
-afs_int32(*rxkad_AlternateTicketDecoder) (afs_int32, char *, afs_int32,
+afs_int32(*rxkad_AlternateTicketDecoder) (afs_int32, char *, afs_int32,
char *, char *, char *,
struct ktc_encryptionKey *,
afs_int32 *, afs_uint32 *,
code =
tkt_DecodeTicket5(tix, tlen, tsp->get_key, tsp->get_key_rock,
kvno, client.name, client.instance, client.cell,
- &sessionkey, &host, &start, &end,
+ &sessionkey, &host, &start, &end,
tsp->flags & RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
if (code)
return code;
return code;
}
code = tkt_CheckTimes(start, end, time(0));
- if (code == 0)
+ if (code == 0)
return RXKADNOAUTH;
else if (code == -1)
return RXKADEXPIRED;
/* Set security object configuration variables */
afs_int32 rxkad_SetConfiguration(struct rx_securityClass *aobj,
- struct rx_connection *aconn,
+ struct rx_connection *aconn,
rx_securityConfigVariables atype,
void * avalue, void **currentValue)
{
- struct rxkad_sprivate *private =
+ struct rxkad_sprivate *private =
(struct rxkad_sprivate *) aobj->privateData;
switch (atype) {
case RXS_CONFIG_FLAGS:
if (currentValue) {
*((afs_uint32 *)currentValue) = private->flags;
- } else {
+ } else {
private->flags = (intptr_t)avalue;
}
break;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Revision 1.2 88/11/18 15:13:00
* remove spurious rcsid dcl
- *
+ *
* Revision 1.1 88/11/18 10:43:25
* Initial revision
* */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 1995, 1996, 1997, 2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* require a specific license from the United States Government.
* It is the responsibility of any person or organization contemplating
* export to obtain such a license before exporting.
- *
+ *
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
* distribute this software and its documentation for any purpose and
* without fee is hereby granted, provided that the above copyright
goto cleanup;
}
- /* If kvno is null, it's probably not included because it was kvno==0
+ /* If kvno is null, it's probably not included because it was kvno==0
* in the ticket */
if (t5.enc_part.kvno == NULL) {
v5_serv_kvno = 0;
}
if (!disableCheckdot) {
- /*
+ /*
* If the first part of the name_string contains a dot, punt since
* then we can't see the diffrence between the kerberos 5
* principals foo.root and foo/root later in the fileserver.
return 0;
}
-unsigned
+unsigned
TicketFlags2int(TicketFlags f)
{
unsigned r = 0;
return r;
}
-TicketFlags
+TicketFlags
int2TicketFlags(unsigned n)
{
TicketFlags flags;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Void.
*
* Environment:
- * Actions depend on scout_gtx_initialized.
+ * Actions depend on scout_gtx_initialized.
*
* Side Effects:
* This routine will always exit Scout.
*------------------------------------------------------------------------*/
int
-mini_justify(char *a_srcbuff, char *a_dstbuff, int a_dstwidth,
+mini_justify(char *a_srcbuff, char *a_dstbuff, int a_dstwidth,
int a_justification, int a_rightTrunc,
int a_isLabeledDisk)
{ /*mini_justify */
*------------------------------------------------------------------------*/
static int
-mini_PrintDiskStats(struct mini_line *a_srvline,
- struct ProbeViceStatistics *a_stats,
+mini_PrintDiskStats(struct mini_line *a_srvline,
+ struct ProbeViceStatistics *a_stats,
int a_probeOK, int a_width_changed,
int a_fix_line_num, int a_delta_line_num)
{ /*mini_PrintDiskStats */
*------------------------------------------------------------------------*/
static int
-init_mini_line(struct sockaddr_in *a_skt, int a_lineNum,
+init_mini_line(struct sockaddr_in *a_skt, int a_lineNum,
struct mini_line *a_line, char *a_srvname)
{ /*init_mini_line */
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
return (-1);
}
*ahost = hp->h_name;
- /* was: syslog(LOG_ERR, "rcmd: host=%s, rport=%d, luser=%s,ruser=%s,cmd=%s,fd2p=%s\n", *ahost,rport,locuser,remuser,cmd,fd2p)
+ /* was: syslog(LOG_ERR, "rcmd: host=%s, rport=%d, luser=%s,ruser=%s,cmd=%s,fd2p=%s\n", *ahost,rport,locuser,remuser,cmd,fd2p)
* but that trashes hp... */
sigprocmask(SIG_BLOCK, &sigBlock, &oldset);
for (;;) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define IOPS_DEBUG_MALLOC_STEP 64
/* check_iops
- * Returns 1 if first time we've seen this file/line.
+ * Returns 1 if first time we've seen this file/line.
* Puts file/line in array so we only print the first time we encounter
* this entry.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Glue layer. */
#ifdef AFS_LINUX20_ENV
-int proc_afs_syscall(long syscall, long param1, long param2, long param3,
+int proc_afs_syscall(long syscall, long param1, long param2, long param3,
long param4, int *rval);
#endif
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
This utility is used to increase the ref count on inodes moved to
-lost+found by the non-AFS fsck. The program needs to be run once
+lost+found by the non-AFS fsck. The program needs to be run once
for every volume located on the partition that was fsck'ed.
Procedure:
cc -o fixit fixit.c
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "afssyscalls.h"
#ifdef AFS_LINUX20_ENV
-int proc_afs_syscall(long syscall, long param1, long param2, long param3,
+int proc_afs_syscall(long syscall, long param1, long param2, long param3,
long param4, int *rval) {
struct afsprocdata syscall_data;
int fd = open(PROC_SYSCALL_FNAME, O_RDWR);
#endif
#if defined(AFS_DARWIN80_ENV)
-int ioctl_afs_syscall(long syscall, long param1, long param2, long param3,
+int ioctl_afs_syscall(long syscall, long param1, long param2, long param3,
long param4, long param5, long param6, int *rval) {
struct afssysargs syscall_data;
void *ioctldata;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
#if defined(AFS_LINUX20_ENV)
- rval = proc_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
+ rval = proc_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
follow, &errcode);
if(rval)
- errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg,
+ errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg,
follow);
#elif defined(AFS_DARWIN80_ENV)
rval = ioctl_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if ( !init ) {
HKEY hk;
- if (RegOpenKey (HKEY_LOCAL_MACHINE,
+ if (RegOpenKey (HKEY_LOCAL_MACHINE,
TEXT("Software\\OpenAFS\\Client"), &hk) == 0)
{
DWORD dwSize = sizeof(BOOL);
if ( !init ) {
HKEY hk;
- if (RegOpenKey (HKEY_LOCAL_MACHINE,
+ if (RegOpenKey (HKEY_LOCAL_MACHINE,
TEXT("Software\\OpenAFS\\Client"), &hk) == 0)
{
DWORD dwSize = sizeof(BOOL);
return smcheck;
}
-static DWORD
+static DWORD
GetServiceStatus(
- LPSTR lpszMachineName,
+ LPSTR lpszMachineName,
LPSTR lpszServiceName,
- DWORD *lpdwCurrentState)
-{
- DWORD hr = NOERROR;
- SC_HANDLE schSCManager = NULL;
- SC_HANDLE schService = NULL;
- DWORD fdwDesiredAccess = 0;
- SERVICE_STATUS ssServiceStatus = {0};
- BOOL fRet = FALSE;
-
- *lpdwCurrentState = 0;
-
- fdwDesiredAccess = GENERIC_READ;
-
- schSCManager = OpenSCManager(lpszMachineName,
+ DWORD *lpdwCurrentState)
+{
+ DWORD hr = NOERROR;
+ SC_HANDLE schSCManager = NULL;
+ SC_HANDLE schService = NULL;
+ DWORD fdwDesiredAccess = 0;
+ SERVICE_STATUS ssServiceStatus = {0};
+ BOOL fRet = FALSE;
+
+ *lpdwCurrentState = 0;
+
+ fdwDesiredAccess = GENERIC_READ;
+
+ schSCManager = OpenSCManager(lpszMachineName,
NULL,
- fdwDesiredAccess);
-
- if(schSCManager == NULL)
- {
+ fdwDesiredAccess);
+
+ if(schSCManager == NULL)
+ {
hr = GetLastError();
- goto cleanup;
- }
-
+ goto cleanup;
+ }
+
schService = OpenService(schSCManager,
lpszServiceName,
- fdwDesiredAccess);
-
- if(schService == NULL)
- {
+ fdwDesiredAccess);
+
+ if(schService == NULL)
+ {
hr = GetLastError();
- goto cleanup;
- }
-
+ goto cleanup;
+ }
+
fRet = QueryServiceStatus(schService,
- &ssServiceStatus);
-
- if(fRet == FALSE)
- {
- hr = GetLastError();
- goto cleanup;
- }
-
- *lpdwCurrentState = ssServiceStatus.dwCurrentState;
-
-cleanup:
-
- CloseServiceHandle(schService);
- CloseServiceHandle(schSCManager);
-
- return(hr);
-}
+ &ssServiceStatus);
+
+ if(fRet == FALSE)
+ {
+ hr = GetLastError();
+ goto cleanup;
+ }
+
+ *lpdwCurrentState = ssServiceStatus.dwCurrentState;
+
+cleanup:
+
+ CloseServiceHandle(schService);
+ CloseServiceHandle(schSCManager);
+
+ return(hr);
+}
// krb5 functions
DECL_FUNC_PTR(krb5_cc_default_name);
subststr[2] = '\0';
return TRUE;
}
- } else
+ } else
if ( device[0] == '\\' &&
device[1] == '?' &&
device[2] == '?' &&
return FALSE;
}
-//
+//
// drivestr - is "<drive-letter>:"
//
static BOOL
if ( DriveSubstitution(drivestr, subststr, MAX_PATH) )
{
if (subststr[0] == '\\' &&
- subststr[1] == '\\')
+ subststr[1] == '\\')
{
if (_strnicmp( &subststr[2], NetbiosName, strlen(NetbiosName)) == 0)
return TRUE;
break;
}
while (dwResultEnum != ERROR_NO_MORE_ITEMS);
-
+
//
// Call the GlobalFree function to free the memory.
//
char szSubMount[260];
DWORD dwType;
- dwResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- AFSREG_CLT_SVC_PARAM_SUBKEY "\\GlobalAutoMapper",
+ dwResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ AFSREG_CLT_SVC_PARAM_SUBKEY "\\GlobalAutoMapper",
0, KEY_QUERY_VALUE, &hKey);
if (dwResult != ERROR_SUCCESS)
return FALSE;
if (DriveIsMappedToAFS(tbuffer, netbiosName) ||
DriveIsGlobalAutoMapped(tbuffer))
strcpy(&tbuffer[2], SMB_IOCTL_FILENAME);
- else
+ else
return -1;
break;
default:
if (DriveIsGlobalAutoMapped(tbuffer))
strcpy(&tbuffer[2], SMB_IOCTL_FILENAME);
- else
+ else
return -1;
}
- } else if (fileNamep[0] == fileNamep[1] &&
+ } else if (fileNamep[0] == fileNamep[1] &&
(fileNamep[0] == '\\' || fileNamep[0] == '/'))
{
int count = 0, i = 0;
if (DriveIsMappedToAFS(tbuffer, netbiosName) ||
DriveIsGlobalAutoMapped(tbuffer))
strcpy(&tbuffer[2], SMB_IOCTL_FILENAME);
- else
+ else
return -1;
break;
default:
if (DriveIsGlobalAutoMapped(tbuffer))
strcpy(&tbuffer[2], SMB_IOCTL_FILENAME);
- else
+ else
return -1;
}
} else if (curdir[0] == curdir[1] &&
- (curdir[0] == '\\' || curdir[0] == '/'))
+ (curdir[0] == '\\' || curdir[0] == '/'))
{
int count = 0, i = 0;
gle = GetLastError();
if (gle && ioctlDebug ) {
char buf[4096];
-
+
saveerrno = errno;
if ( FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
lana_GetNetbiosName(szClient, LANA_NETBIOS_NAME_FULL);
- if (RegOpenKey (HKEY_CURRENT_USER,
+ if (RegOpenKey (HKEY_CURRENT_USER,
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"), &hk) == 0)
{
DWORD dwType = REG_SZ;
pathHasDrive = 0;
}
- if ( firstp[0] == '\\' && firstp[1] == '\\' ||
+ if ( firstp[0] == '\\' && firstp[1] == '\\' ||
firstp[0] == '/' && firstp[1] == '/') {
/* UNC path - strip off the server and sharename */
int i, count;
/* if there is a non-null name after the drive, append it */
if (*firstp != 0) {
int len = (int)strlen(outPathp);
- if (outPathp[len-1] != '\\' && outPathp[len-1] != '/')
+ if (outPathp[len-1] != '\\' && outPathp[len-1] != '/')
strcat(outPathp, "\\");
strcat(outPathp, firstp);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 *errornumber) = 1;
Pioctl( IN clientcred *cred,
- string path<MAXPATHLEN>,
- afs_int32 cmd,
- afs_int32 follow,
- rmtbulk *InData,
+ string path<MAXPATHLEN>,
+ afs_int32 cmd,
+ afs_int32 follow,
+ rmtbulk *InData,
INOUT rmtbulk *OutData,
OUT afs_int32 *errornumber) = 2;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
-#include <stdlib.h>
+#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int afs_get_pag_from_groups(afs_uint32 g0, afs_uint32 g1);
void afs_get_groups_from_pag(afs_uint32 pag, afs_uint32 * g0p, afs_uint32 * g1p);
-/* Picks up the name of the remote afs client host where the rmtsys
+/* Picks up the name of the remote afs client host where the rmtsys
* daemon resides. Since the clients may be diskless and/or readonly
* ones we felt it's better to rely on an shell environment
* (AFSSERVER) for the host name first. If that is not set, the
clientcred creds;
afs_int32 errorcode, errornumber, newpag, ngroups, j;
afs_uint32 groups[NGROUPS_MAX];
-
+
if (!(conn = rx_connection(&errorcode, "setpag"))) {
/* Remote call can't be performed for some reason.
* Try the local 'setpag' system call ... */
inparam_conversion(cmd, InData.rmtbulk_val, 0);
OutData.rmtbulk_len = MAXBUFFERLEN * sizeof(*OutData.rmtbulk_val);
- OutData.rmtbulk_val = malloc(OutData.rmtbulk_len);
+ OutData.rmtbulk_val = malloc(OutData.rmtbulk_len);
if (!OutData.rmtbulk_val) {
free(inbuffer);
return -1;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct rx_securityClass *(securityObjects[N_SECURITY_OBJECTS]);
struct rx_service *service;
- /*
+ /*
* Ignore SIGHUP signal since apparently is sent to the processes that
- * start up from /etc/rc for some systems like hpux and aix3.1...
+ * start up from /etc/rc for some systems like hpux and aix3.1...
*/
signal(SIGHUP, SIG_IGN);
* here we also get back the new pag value; we need this so that the caller
* can add it to its group list via setgroups() */
afs_int32
-SRMTSYS_SetPag(struct rx_call *call, clientcred *creds, afs_int32 *newpag,
+SRMTSYS_SetPag(struct rx_call *call, clientcred *creds, afs_int32 *newpag,
afs_int32 *errornumber)
{
afs_uint32 blob[PIOCTL_HEADER];
/* Implements the remote pioctl(2) call */
afs_int32
-SRMTSYS_Pioctl(struct rx_call *call, clientcred *creds, char *path,
- afs_int32 cmd, afs_int32 follow, rmtbulk *InData,
+SRMTSYS_Pioctl(struct rx_call *call, clientcred *creds, char *path,
+ afs_int32 cmd, afs_int32 follow, rmtbulk *InData,
rmtbulk *OutData, afs_int32 *errornumber)
{
afs_int32 error;
rmt_Quit(char *msg, ...)
{
va_list ap;
-
+
va_start(ap, msg);
vfprintf(stderr, msg, ap);
va_end(ap);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <afs/sys_prototypes.h>
#include <unistd.h>
#include <stdio.h>
-#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
+#if !defined(AFS_AIX_ENV) && !defined(AFS_NT40_ENV)
# include <sys/syscall.h>
#endif
#include "afssyscalls.h"
#ifdef AFS_LINUX20_ENV
int rval;
-
+
rval = proc_afs_syscall(AFSCALL_SETPAG,0,0,0,0,&errcode);
-
+
if(rval)
errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
#elif defined(AFS_DARWIN80_ENV)
#else
errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
#endif
-
+
return (errcode);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* rmtsysc.c */
struct ViceIoctl;
-extern int pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data,
+extern int pioctl(char *path, afs_int32 cmd, struct ViceIoctl *data,
afs_int32 follow);
#ifdef AFS_DUX40_ENV
extern int afs_setpag(void);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define AFS_XFS_NAME_VERS AFS_XFS_NAME_VERS2
#define AFS_INODE_DIR_NAME ".afsinodes."
-/* Unfortunately, to get all this in 39 bytes requires proper packing.
+/* Unfortunately, to get all this in 39 bytes requires proper packing.
* So, the version number is at an offset instead of first.
*/
typedef struct {
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* COPYRIGHT NOTICE
* Copyright (c) 1997 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software_Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
+ *
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998, 2001, 2004 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
/* Hash function used in AFS directories. */
static int namehash(char *name, int buckets, int seed)
-{
+{
int hval = seed, tval;
while (*name) hval = (hval * 173) + *name++;
afs_uint32 Dir_Finalize(struct dir_state *ds)
{
int pages = ds->pageno + 1;
-
+
if (ds->pageno < 128) ds->dh->allomap[ds->pageno] = ds->used;
ds->dh->pagehdr.pgcount = htons(pages);
return 0;
* consists of a 32-bit number containing the size, immediately followed
* by the data itself. The interesting structures and constants are
* defined in <afs/dir.h>
- *
+ *
* A directory consists of one or more 'pages', each of which is 2K
* (AFS_PAGESIZE). Each page contains EPP (currently 64) 'entries', each
* of which is 32 bytes. The first page begins with a DirHeader, which
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998, 2001 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998, 2001, 2003 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
# COPYRIGHT NOTICE
# Copyright (c) 1997 Carnegie Mellon University
# All Rights Reserved.
-#
+#
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
-#
+#
# CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
# CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
# ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
-#
+#
# Carnegie Mellon requests users of this software to return to
-#
+#
# Software Distribution Coordinator or Software_Distribution@CS.CMU.EDU
# School of Computer Science
# Carnegie Mellon University
# Pittsburgh PA 15213-3890
-#
+#
# any improvements or extensions that they make and grant Carnegie Mellon
# the rights to redistribute these changes.
*
* The DUMPEND section consists of one part: the DUMPENDMAGIC magic
* number (32 bits).
- *
+ *
* Notes:
*
* The tagged elements are all ASCII letters, as opposed to the section
/*
* Given a directory vnode and a filename, return the vnode corresponding
* to the file in that directory.
- *
+ *
* We now handle pathnames with directories in them.
*/
/*
- * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1998 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
enum { PIOCTL_MAXSIZE = 2000 };
/*
- * fs_getfid, the the `fid' that `path' points on.
+ * fs_getfid, the the `fid' that `path' points on.
*/
int
* File: fsx.c
* Author: Avadis Tevanian, Jr.
*
- * File system exerciser.
+ * File system exerciser.
*
* Rewritten 8/98 by Conrad Minshall.
*/
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
/* Prescan the vnodes in a dump file, collecting information that will
- * be useful in generating and following pathnames.
+ * be useful in generating and following pathnames.
*/
afs_uint32
Path_PreScan(XFILE * X, path_hashinfo * phi, int full)
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995-2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
- * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
+ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2000 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* Copyright (c) 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#
# Copyright (c) 1998 Carnegie Mellon University
# All Rights Reserved.
-#
+#
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* - Actually obeys the length limit, which (unfortunately) many
* implementations of snprintf do not.
- *
+ *
* - Supports all the standard format specifiers for integers
* (d, i, o, u, x, X), floating-point values (f, e, E, g, G),
* and strings and characters (c, s, %), plus a few unusual
* but useful ones described below.
- *
+ *
* - Supports all the standard flags (-, 0, +, space, #). These
* flags are ignored if used when they are not appropriate.
- *
+ *
* - Supports the standard size modifiers for short (h), long (h),
* and double (L) arguments. These modifiers are ignored if used
* when they are not appropriate.
- *
+ *
* - Supports minimum field width and precision, where appropriate,
* including the use of '*' to specify a value given as an argument
* instead of in the format string. There is a maximum precision
* of 100 digits.
- *
+ *
* - At present, the 'p' specifier for printing pointers is not
* implemented, because it is inherently non-portable and thus
* can be implemented correctly only by the compiler's run-time
*
* - Floating-point specifier (%e, %f, %g) are implemented by
* calling the standard sprintf, and thus may be unsafe.
- *
+ *
* - The '%...$' notation is used primarily when the format string
* is specified by the user, who knows but cannot change the order
* of the arguments. Such usage is inherently dangerous and
* insecure; thus, it is not supported.
- *
+ *
* The custom format specifier '%I' is supported. This specifier
* takes as its argument an unsigned long integer containing an
* IPv4 address in network byte order. The address is rendered
* either as a hostname or as a dotted quad, as follows:
- *
+ *
* - If precision is nonzero or unspecified, a hostname lookup
* is attempted; if it is successful, the hostname is printed.
* If the hostname lookup fails, the address is printed in
* dotted-quad notation.
- *
+ *
* - If precision is explicitly specified as 0, then the hostname
* lookup is skipped, and dotted-quad notation is always used.
- *
+ *
* - If a hostname is to be printed:
* + The precision controls the maximum number of characters
* printed, as with %s.
* will be forced to upper case before printing. If both
* '#' and '+' are given, the '+' flag will be ignored.
* + The '0' and ' ' flags have no effect.
- *
+ *
* - If a dotted quad is to be printed:
* + The precision has no effect; dotted quads are always
* 7 to 12 characters in length, depending on the value
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
*
* Copyright (c) 1998 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
/*
* Copyright 2006, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
hdr = (SALVSYNC_response_hdr *) res->payload.buf;
}
- fprintf(stderr, "calling SALVSYNC_SalvageVolume with command code %d (%s)\n",
+ fprintf(stderr, "calling SALVSYNC_SalvageVolume with command code %d (%s)\n",
command, command_code_to_string(command));
code = SALVSYNC_SalvageVolume(state->sop->volume,
}
fprintf(stderr, "SALVSYNC_SalvageVolume returned %d (%s)\n", code, response_code_to_string(code));
- fprintf(stderr, "protocol response code was %d (%s)\n",
+ fprintf(stderr, "protocol response code was %d (%s)\n",
res->hdr.response, response_code_to_string(res->hdr.response));
- fprintf(stderr, "protocol reason code was %d (%s)\n",
+ fprintf(stderr, "protocol reason code was %d (%s)\n",
res->hdr.reason, reason_code_to_string(res->hdr.reason));
printf("state = {\n");
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
/*
* Initialize kauth package here so we don't have to call it
- * each time we call the authenticate routine.
+ * each time we call the authenticate routine.
*/
ka_Init(0);
memset(meths, 0, sizeof(struct secmethod_table));
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
/*
* Initialize kauth package here so we don't have to call it
- * each time we call the authenticate routine.
+ * each time we call the authenticate routine.
*/
ka_Init(0);
memset(meths, 0, sizeof(struct secmethod_table));
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
static char krbrlm[REALM_SZ+1];
char **hrealms = 0;
krb5_error_code retval;
-
+
if (!cellconfig)
return 0;
-
+
if (fallback) {
char * p;
p = strchr(cellconfig->hostName[0], '.');
else
strcpy(krbrlm, cellconfig->name);
for (p=krbrlm; *p; p++) {
- if (islower(*p))
+ if (islower(*p))
*p = toupper(*p);
}
} else {
if (retval = krb5_get_host_realm(context,
cellconfig->hostName[0], &hrealms))
- return 0;
+ return 0;
if(!hrealms[0]) return 0;
strcpy(krbrlm, hrealms[0]);
-
+
if (hrealms) krb5_free_host_realm(context, hrealms);
}
return krbrlm;
int code, unixauthneeded, password_expires = -1;
int status;
krb5_context context;
-
+
krb5_init_context(&context);
*reenter = 0;
*message = (char *)0;
-
+
status = auth_to_cell(context, userName, NULL, NULL);
-
+
if (status) {
char *str = afs_error_message(status);
*message = (char *)malloc(1024);
str);
return AUTH_FAILURE; /* NOTFOUND? */
}
-
+
#if 0
/*
* Local hack - if the person has a file in their home
* directory called ".xlog", read that for a list of
* extra cells to authenticate to
*/
-
+
if ((pwd = getpwuid(getuid())) != NULL) {
struct stat sbuf;
FILE *f;
char fcell[100], xlog_path[512];
-
+
strcpy(xlog_path, pwd->pw_dir);
strcat(xlog_path, "/.xlog");
-
+
if ((stat(xlog_path, &sbuf) == 0) &&
((f = fopen(xlog_path, "r")) != NULL)) {
-
+
while (fgets(fcell, 100, f) != NULL) {
int auth_status;
-
+
fcell[strlen(fcell) - 1] = '\0';
-
+
auth_status = auth_to_cell(context, userName, fcell, NULL);
if (status == AKLOG_SUCCESS)
status = auth_status;
return AUTH_SUCCESS;
}
-static krb5_error_code get_credv5(krb5_context context, char *user,
+static krb5_error_code get_credv5(krb5_context context, char *user,
char *name, char *inst, char *realm,
krb5_creds **creds)
{
krb5_error_code r;
static krb5_principal client_principal = 0;
char *str;
-
+
memset(&increds, 0, sizeof(increds));
/* instance may be ptr to a null string. Pass null then */
if ((r = krb5_build_principal(context, &increds.server,
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: krb5_cc_default returns %d", r);
return r;
}
- r = krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
+ r = krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
if (r) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: krb5_cc_get_principal returns %d", r);
return r;
- }
+ }
increds.client = client_principal;
increds.times.endtime = 0;
/* Ask for DES since that is what V4 understands */
get_creds_enctype((&increds)) = ENCTYPE_DES_CBC_CRC;
-
+
r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
-
+
return r;
}
{
static krb5_principal client_principal = 0;
int i;
-
+
if (!_krb425_ccache)
krb5_cc_default(context, &_krb425_ccache);
if (!client_principal)
krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
-
+
i = realm_len(context, client_principal);
if (i > REALM_SZ-1) i = REALM_SZ-1;
strncpy(realm,realm_data(context, client_principal), i);
realm[i] = 0;
-
+
return 0;
}
{
int status = 0;
struct afsconf_dir *configdir;
-
+
memset(local_cell, 0, sizeof(local_cell));
memset(cellconfig, 0, sizeof(*cellconfig));
-
+
if (!(configdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
return AFSCONF_NODB;
}
-
+
if (afsconf_GetLocalCell(configdir, local_cell, MAXCELLCHARS)) {
return AFSCONF_FAILURE;
}
-
+
if ((cell == NULL) || (cell[0] == 0))
cell = local_cell;
-
+
linkedcell[0] = '\0';
if (afsconf_GetCellInfo(configdir, cell, NULL, cellconfig)) {
status = AFSCONF_NOTFOUND;
}
- if (cellconfig->linkedCell)
+ if (cellconfig->linkedCell)
strncpy(linkedcell,cellconfig->linkedCell,MAXCELLCHARS);
-
+
(void) afsconf_Close(configdir);
-
+
return(status);
}
-/*
+/*
* Log to a cell. If the cell has already been logged to, return without
* doing anything. Otherwise, log to it and mark that it has been logged
* to.
int status = 0;
char username[BUFSIZ]; /* To hold client username structure */
afs_int32 viceId; /* AFS uid of user */
-
+
char name[ANAME_SZ]; /* Name of afs key */
char primary_instance[INST_SZ]; /* Instance of afs key */
char secondary_instance[INST_SZ]; /* Backup instance to try */
struct ktc_token atoken, btoken;
int afssetpag = 0, uid = -1;
struct passwd *pwd;
-
+
memset(name, 0, sizeof(name));
memset(primary_instance, 0, sizeof(primary_instance));
memset(secondary_instance, 0, sizeof(secondary_instance));
strncpy(confname, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confname));
confname[sizeof(confname) - 2] = '\0';
}
-
+
/* NULL or empty cell returns information on local cell */
if ((status = get_cellconfig(cell, &ak_cellconfig,
local_cell, linkedcell))) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: get_cellconfig returns %d", status);
return(status);
}
-
+
strncpy(cell_to_use, ak_cellconfig.name, MAXCELLCHARS);
cell_to_use[MAXCELLCHARS] = 0;
-
+
/*
* Find out which realm we're supposed to authenticate to. If one
* is not included, use the kerberos realm found in the credentials
* cache.
*/
-
+
if (realm && realm[0]) {
strcpy(realm_of_cell, realm);
}
else {
char *afs_realm = afs_realm_of_cell(context, &ak_cellconfig, FALSE);
-
+
if (!afs_realm) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: afs_realm_of_cell returns %d", status);
return AFSCONF_FAILURE;
}
-
+
strcpy(realm_of_cell, afs_realm);
}
-
- /* We use the afs.<cellname> convention here...
+
+ /* We use the afs.<cellname> convention here...
*
* Doug Engert's original code had principals of the form:
*
* try the second one. You can select which one you prefer with
* a configure option.
*/
-
+
strcpy(name, AFSKEY);
-
+
if (1 || strcasecmp(cell_to_use, realm_of_cell) != 0) {
strncpy(primary_instance, cell_to_use, sizeof(primary_instance));
primary_instance[sizeof(primary_instance)-1] = '\0';
sizeof(secondary_instance));
secondary_instance[sizeof(secondary_instance)-1] = '\0';
}
-
- /*
+
+ /*
* Extract the session key from the ticket file and hand-frob an
* afs style authenticator.
*/
-
+
/*
* Try to obtain AFS tickets. Because there are two valid service
* names, we will try both, but trying the more specific first.
* afs/<cell>@<realm> i.e. allow for single name with "."
* afs@<realm>
*/
-
+
status = get_credv5(context, user, name, primary_instance, realm_of_cell,
&v5cred);
-
- if ((status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN ||
+
+ if ((status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN ||
status == KRB5KRB_ERR_GENERIC) && !realm_of_cell[0]) {
char *afs_realm = afs_realm_of_cell(context, &ak_cellconfig, TRUE);
-
+
if (!afs_realm) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: afs_realm_of_cell returns %d", status);
return AFSCONF_FAILURE;
}
-
+
strcpy(realm_of_cell, afs_realm);
-
+
if (strcasecmp(cell_to_use, realm_of_cell) == 0) {
try_secondary = 1;
secondary_instance[0] = '\0';
}
-
- status = get_credv5(context, user, name, primary_instance,
+
+ status = get_credv5(context, user, name, primary_instance,
realm_of_cell, &v5cred);
}
- if (status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN ||
+ if (status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN ||
status == KRB5KRB_ERR_GENERIC) {
if (try_secondary)
status = get_credv5(context, user, name, secondary_instance,
realm_of_cell, &v5cred);
}
-
+
if (status) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: get_credv5 returns %d", status);
return status;
}
-
+
strncpy(aserver.name, AFSKEY, MAXKTCNAMELEN - 1);
strncpy(aserver.instance, AFSINST, MAXKTCNAMELEN - 1);
strncpy(aserver.cell, cell_to_use, MAXKTCREALMLEN - 1);
-
+
/*
* The default is to use rxkad2b, which means we put in a full
* V5 ticket. If the user specifies -524, we talk to the
* 524 ticket converter.
*/
-
+
{
char *p;
int len;
-
+
len = min(get_princ_len(context, v5cred->client, 0),
second_comp(context, v5cred->client) ?
MAXKTCNAMELEN - 2 : MAXKTCNAMELEN - 1);
strncpy(username, get_princ_str(context, v5cred->client, 0), len);
username[len] = '\0';
-
+
if (second_comp(context, v5cred->client)) {
strcat(username, ".");
p = username + strlen(username);
strncpy(p, get_princ_str(context, v5cred->client, 1), len);
p[len] = '\0';
}
-
+
memset(&atoken, 0, sizeof(atoken));
atoken.kvno = RXKAD_TKT_TYPE_KERBEROS_V5;
atoken.startTime = v5cred->times.starttime;;
atoken.ticketLen = v5cred->ticket.length;
memcpy(atoken.ticket, v5cred->ticket.data, atoken.ticketLen);
}
-
+
if ((status = get_user_realm(context, realm_of_user))) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: get_user_realm returns %d", status);
return KRB5_REALM_UNKNOWN;
strcat(username, "@");
strcat(username, realm_of_user);
}
-
+
strcpy(lastcell, aserver.cell);
/*
if ((status == 0) && (viceId != ANONYMOUSID))
sprintf (username, "AFS ID %d", (int) viceId);
#else
- /*
- * This actually only works assuming that your uid and pts space match
+ /*
+ * This actually only works assuming that your uid and pts space match
* and probably this works only for the local cell anyway.
*/
-
+
if ((uid = getuid()) == 0) {
if ((pwd = getpwnam(user)) == NULL) {
syslog(LOG_AUTH|LOG_ERR, "LAM aklog: getpwnam %s failed", user);
return AUTH_FAILURE;
}
}
-
+
/* Don't do first-time registration. Handle only the simple case */
- if ((status == 0) && (viceId != ANONYMOUSID))
+ if ((status == 0) && (viceId != ANONYMOUSID))
sprintf (username, "AFS ID %d", ((uid==0)?(int)pwd->pw_uid:(int)uid));
#endif
strncpy(aclient.name, username, MAXKTCNAMELEN - 1);
strcpy(aclient.instance, "");
strncpy(aclient.cell, realm_of_user, MAXKTCREALMLEN - 1);
-
+
#ifndef AFS_AIX51_ENV
- /* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before
- * this routine, it will not add the token. It is not clear what
+ /* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before
+ * this routine, it will not add the token. It is not clear what
* is going on here! So we will do the following operation.
* On AIX 5 this kills our parent. So we won't.
*/
struct sigaction newAction, origAction;
pid_t cid, pcid;
int wstatus;
-
+
sigemptyset(&newAction.sa_mask);
newAction.sa_handler = SIG_DFL;
newAction.sa_flags = 0;
} while ((pcid == -1) && (errno == EINTR));
if ((pcid == cid) && WIFEXITED(wstatus))
status = WEXITSTATUS(wstatus);
- else
+ else
status = -1;
- }
+ }
syslog(LOG_AUTH|LOG_DEBUG, "LAM aklog: collected child status %d", status);
sigaction(SIGCHLD, &origAction, NULL);
} else {
aklog_initialize(struct secmethod_table *meths)
{
memset(meths, 0, sizeof(struct secmethod_table));
- syslog(LOG_AUTH|LOG_DEBUG, "LAM aklog loaded: uid %d pag %d", getuid(), getpagvalue("afs"));
+ syslog(LOG_AUTH|LOG_DEBUG, "LAM aklog loaded: uid %d pag %d", getuid(), getpagvalue("afs"));
/*
* Initialize the exported interface routines.
* Aside from method_authenticate, these are just no-ops.
meths->method_passwdexpired = aklog_passwdexpired;
meths->method_passwdrestrictions = aklog_passwdrestrictions;
meths->method_getpasswd = aklog_getpasswd;
-
+
return (0);
}
#endif /* AFS_AIX51_ENV */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef _AFS_TSM41_AIX_AUTH_PROTOTYPES_H
#define _AFS_TSM41_AIX_AUTH_PROTOTYPES_H
-extern int afs_authenticate(char *userName,
- char *response,
- int *reenter,
+extern int afs_authenticate(char *userName,
+ char *response,
+ int *reenter,
char **message);
-extern int afs_chpass(char *userName, char *oldPasswd,
+extern int afs_chpass(char *userName, char *oldPasswd,
char *newPasswd, char **message);
extern int afs_passwdexpired(char *userName, char **message);
-extern int afs_passwdrestrictions(char *userName, char *newPasswd,
+extern int afs_passwdrestrictions(char *userName, char *newPasswd,
char *oldPasswd, char ** message);
extern char * afs_getpasswd(char * userName);
extern void aix_ktc_setup_ticket_file(char * userName);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
setpwent(); /* open the pwd database */
pwd = getpwnam(userName);
if (pwd) {
- if (chown(ktc_tkt_string_uid(pwd->pw_uid),
+ if (chown(ktc_tkt_string_uid(pwd->pw_uid),
pwd->pw_uid, pwd->pw_gid) < 0) {
perror("chown: ");
}
/*
* Copyright 2006, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* demand attach fs
- * save all fileserver state
+ * save all fileserver state
*/
int
fs_stateSave(void)
struct fs_dump_state state;
/* save and restore need to be atomic wrt other host package operations */
- H_LOCK;
+ H_LOCK;
ViceLog(0, ("fs_stateSave: commencing fileserver state dump\n"));
if (fs_stateCommitDump(&state)) {
ViceLog(0, ("fs_stateSave: error: dump commit failed\n"));
- ret = 1;
+ ret = 1;
goto done;
}
renamefile(state->fn, savedump);
}
- if (((fd = afs_open(state->fn,
- O_RDWR | O_CREAT | O_TRUNC,
+ if (((fd = afs_open(state->fn,
+ O_RDWR | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR)) == -1) ||
(afs_fstat(fd, &status) == -1)) {
ViceLog(0, ("fs_stateCreateDump: failed to create state dump file '%s'\n",
}
#endif
- /* ensure that all pending data I/Os for the state file have been committed
+ /* ensure that all pending data I/Os for the state file have been committed
* _before_ we make the metadata I/Os */
if (fs_stateSync(state)) {
ViceLog(0, ("fs_stateCommitDump: failed to sync changes to disk\n"));
/* XXX madvise may not exist on all platforms, so
* we may need to add some ifdefs at some point... */
{
- madvise((((char *)state->mmap.map) + sizeof(struct fs_state_header)),
- state->mmap.size - sizeof(struct fs_state_header),
+ madvise((((char *)state->mmap.map) + sizeof(struct fs_state_header)),
+ state->mmap.size - sizeof(struct fs_state_header),
MADV_DONTNEED);
}
#endif
goto done;
}
}
-
+
memcpy(state->mmap.cursor, buf, len);
fs_stateIncCursor(state, len);
#else
return 1;
}
- state->mmap.map = afs_mmap(NULL,
- state->file_len,
- flags,
+ state->mmap.map = afs_mmap(NULL,
+ state->file_len,
+ flags,
MAP_SHARED,
- state->fd,
+ state->fd,
0);
if (state->mmap.map == MAP_FAILED) {
* uncomment the following code. uncommenting this code is _strongly discouraged_ because
* we already make use of the version stamps in the various dump headers to deal with
* data structure version incompatabilities.
- else if (strncmp(hdr->server_version_string, cml_version_number,
+ else if (strncmp(hdr->server_version_string, cml_version_number,
sizeof(hdr->server_version_string)) != 0) {
ViceLog(0, ("fs_stateCheckHeader: dump from different server version\n"));
ret = 1;
}
*/
- else if (strncmp(hdr->server_version_string, cml_version_number,
+ else if (strncmp(hdr->server_version_string, cml_version_number,
sizeof(hdr->server_version_string)) != 0) {
ViceLog(0, ("fs_stateCheckHeader: dump from different server version ; attempting state reload anyway\n"));
}
/*
* Copyright 2006, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* verification process sanity check constants
*
- * make them fairly large so we don't get
- * false positives
+ * make them fairly large so we don't get
+ * false positives
*/
#define FS_STATE_H_MAX_UUID_HASH_CHAIN_LEN 100000 /* max elements in a host uuid-hash chain */
#define FS_STATE_H_MAX_ADDR_HASH_CHAIN_LEN 2000000 /* max elements in a host ipv4-hash chain */
/*
* Copyright 2006, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
int ret = 0;
struct afs_stat status;
-
+
dump_fd = afs_open(path, O_RDWR);
if (dump_fd == -1) {
fprintf(stderr, "dump file '%s' failed to open\n", path);
tok = strtok(NULL, " \t");
if (!tok || strcasecmp(tok, "by")) {
tok = NULL;
- fprintf(stderr, "find syntax error 1 (%s)\n",
+ fprintf(stderr, "find syntax error 1 (%s)\n",
(tok) ? tok : "nil");
continue;
}
fprintf(stderr, "no more HEs\n");
return;
}
-
+
dump_he(he_cursor.idx+1);
}
fprintf(stderr, "no more FEs\n");
return;
}
-
+
dump_fe(fe_cursor.idx+1);
}
fprintf(stderr, "no more CBs\n");
return;
}
-
+
dump_cb(cb_cursor.idx+1);
}
fprintf(stderr, "no more HEs\n");
return;
}
-
+
dump_he(he_cursor.idx-1);
}
fprintf(stderr, "no more FEs\n");
return;
}
-
+
dump_fe(fe_cursor.idx-1);
}
fprintf(stderr, "no more CBs\n");
return;
}
-
+
dump_cb(cb_cursor.idx-1);
}
fprintf(stderr, "no FEs present\n");
return;
}
-
+
dump_fe(0);
}
fprintf(stderr, "no HEs present\n");
return;
}
-
+
dump_he(0);
}
fprintf(stderr, "no CBs present\n");
return;
}
-
+
dump_cb(0);
}
fprintf(stderr, "no HEs present\n");
return;
}
-
+
dump_he(hdrs.h_hdr.records-1);
}
fprintf(stderr, "no FEs present\n");
return;
}
-
+
dump_fe(hdrs.cb_hdr.nFEs-1);
}
fprintf(stderr, "hi offset bits set in h_offset; can't get host_state_header\n");
return 1;
}
- if ((lo >= map_len) ||
+ if ((lo >= map_len) ||
((lo + sizeof(struct host_state_header)) > map_len) ||
(lo + sizeof(struct host_state_header) < lo)) {
fprintf(stderr, "h_offset puts host_state_header beyond end of memory map\n");
fprintf(stderr, "hi offset bits set in cb_offset; can't get callback_state_header\n");
return 1;
}
- if ((lo >= map_len) ||
+ if ((lo >= map_len) ||
((lo + sizeof(struct callback_state_header)) > map_len) ||
(lo + sizeof(struct callback_state_header) < lo)) {
fprintf(stderr, "cb_offset puts callback_state_header beyond end of memory map\n");
fprintf(stderr, "hi offset bits set in timeout_offset; can't get callback_state_timeout_header\n");
return 1;
}
- if ((lo >= map_len) ||
+ if ((lo >= map_len) ||
((lo + sizeof(struct callback_state_timeout_header)) > map_len) ||
(lo + sizeof(struct callback_state_timeout_header) < lo)) {
fprintf(stderr, "timeout_offset puts callback_state_timeout_header beyond end of memory map\n");
fprintf(stderr, "hi offset bits set in fehash_offset; can't get callback_state_fehash_header\n");
return 1;
}
- if ((lo >= map_len) ||
+ if ((lo >= map_len) ||
((lo + sizeof(struct callback_state_fehash_header)) > map_len) ||
(lo + sizeof(struct callback_state_fehash_header) < lo)) {
fprintf(stderr, "timeout_offset puts callback_state_fehash_header beyond end of memory map\n");
return 1;
}
}
-
+
memcpy(&fe_cursor.hdr, fe_cursor.cursor, sizeof(struct callback_state_entry_header));
fe_cursor.hdr_valid = 1;
return 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* not to vote for someone else. This parameter (BIG seconds) is not actually passed in
* the interface (perhaps it should be?) but is instead a compile time constant that both
* sides know about.
-
+
* The beacon and vote modules work intimately together; the vote module decides how long
* it should promise the beacon module its vote, and the beacon module takes all of these
* votes and decides for how long it is the synchronization site.
* \param ame "address of me"
* \param aservers list of other servers
*
- * called only at initialization to set up the list of servers to
- * contact for votes. Just creates the server structure.
+ * called only at initialization to set up the list of servers to
+ * contact for votes. Just creates the server structure.
*
* The "magic" host is the one with the lowest internet address. It is
* magic because its vote counts epsilon more than the others. This acts
* site system, we'd be out of business.
*
* \note There are two connections in every server structure, one for
- * vote calls (which must always go through quickly) and one for database
- * operations, which are subject to waiting for locks. If we used only
- * one, the votes would sometimes get held up behind database operations,
- * and the sync site guarantees would timeout even though the host would be
+ * vote calls (which must always go through quickly) and one for database
+ * operations, which are subject to waiting for locks. If we used only
+ * one, the votes would sometimes get held up behind database operations,
+ * and the sync site guarantees would timeout even though the host would be
* up for communication.
*
* \see ubeacon_InitServerList(), ubeacon_InitServerListByInfo()
return code;
/* Shoud we set some defaults for RX??
- r_retryInterval = 2;
+ r_retryInterval = 2;
r_nRetries = (RPCTIMEOUT/r_retryInterval);
*/
if (info) {
return 0;
}
-/*!
+/*!
* \brief main lwp loop for code that sends out beacons.
- *
+ *
* This code only runs while we're sync site or we want to be the sync site.
* It runs in its very own light-weight process.
*/
}
}
servers[i] = (struct ubik_server *)0; /* end of list */
- /* note that we assume in the vote module that we'll always get at least BIGTIME
+ /* note that we assume in the vote module that we'll always get at least BIGTIME
* seconds of vote from anyone who votes for us, which means we can conservatively
* assume we'll be fine until SMALLTIME seconds after we start collecting votes */
/* this next is essentially an expansion of rgen's ServBeacon routine */
* \brief Verify that a given IP addresses does actually exist on this machine.
*
* \param ame the pointer to my IP address specified in the
- * CellServDB file.
- * \param aservers an array containing IP
- * addresses of remote ubik servers. The array is
+ * CellServDB file.
+ * \param aservers an array containing IP
+ * addresses of remote ubik servers. The array is
* terminated by a zero address.
*
* Algorithm : Verify that my IP addresses \p ame does actually exist
- * on this machine. If any of my IP addresses are there
- * in the remote server list \p aserver, remove them from
- * this list. Update global variable \p ubik_host[] with
+ * on this machine. If any of my IP addresses are there
+ * in the remote server list \p aserver, remove them from
+ * this list. Update global variable \p ubik_host[] with
* my IP addresses.
*
* \return 0 on success, non-zero on failure
if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || AFSDIR_SERVER_NETINFO_FILEPATH) {
/*
* Find addresses we are supposed to register as per the netrestrict file
- * if it exists, else just register all the addresses we find on this
+ * if it exists, else just register all the addresses we find on this
* host as returned by rx_getAllAddr (in NBO)
*/
char reason[1024];
}
/* if any of my addresses are there in serverList, then
- ** use that as my primary addresses : the higher level
+ ** use that as my primary addresses : the higher level
** application screwed up in dealing with multihomed concepts
*/
for (j = 0, found = 0; j < count; j++) {
ubik_print("Using %s as my primary address\n", afs_inet_ntoa_r(*ame, hoststr));
if (!info) {
- /* get rid of servers which were purged because all
- ** those interface addresses are myself
+ /* get rid of servers which were purged because all
+ ** those interface addresses are myself
*/
for (start = 0, end = totalServers - 1; (start < end); start++, end--) {
/* find the first zero entry from the beginning */
}
}
- /* update all my addresses in ubik_host in such a way
- ** that ubik_host[0] has the primary address
+ /* update all my addresses in ubik_host in such a way
+ ** that ubik_host[0] has the primary address
*/
ubik_host[0] = *ame;
for (j = 0, i = 1; j < count; j++)
}
-/*!
+/*!
* \brief Exchange IP address information with remote servers.
*
* \param ubik_host an array containing all my IP addresses.
*
- * Algorithm : Do an RPC to all remote ubik servers infroming them
+ * Algorithm : Do an RPC to all remote ubik servers infroming them
* about my IP addresses. Get their IP addresses and
* update my linked list of ubik servers \p ubik_servers
*
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*!
* \brief Flush all modified buffers, leaves dirty bits set (they're cleared
- * by DSync()).
+ * by DSync()).
*
* \note Note interaction with DSync(): you call this thing first,
* writing the buffers to the disk. Then you call DSync() to sync all the
dbase->version = newversion;
/* Ignore the error here. If the call fails, the site is
- * marked down and when we detect it is up again, we will
+ * marked down and when we detect it is up again, we will
* send the entire database to it.
*/
ContactQuorum_DISK_SetVersion( atrans, 1 /*CStampVersion */ ,
}
/* If we fail anytime after this, then panic and let the
- * recovery replay the log.
+ * recovery replay the log.
*/
code = DFlush(dbase); /* write dirty pages to respective files */
if (code)
return UTWOENDS;
/* Check if we are the write trans before logging abort, lest we
- * abort a good write trans in progress.
- * We don't really care if the LOGABORT gets to the log because we
- * truncate the log next. If the truncate fails, we panic; for
+ * abort a good write trans in progress.
+ * We don't really care if the LOGABORT gets to the log because we
+ * truncate the log next. If the truncate fails, we panic; for
* otherwise, the log entries remain. On restart, replay of the log
* will do nothing because the abort is there or no LogEnd opcode.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* as it requires ulock_getLock to be called with await = 0. And ulock_SetLock
* isn't even used in this code base. Since NT doesn't have a native
* #EAGAIN, we are replacing all instances of #EWOULDBLOCK with #EAGAIN.
- *
+ *
*/
#define WouldReadBlock(lock)\
* * locktype. Before doing that, set TRSETLOCK,
* * to tell udisk_end that another thread (us) is waiting.
* #else
- * * locktype. This field also tells us if the thread is
+ * * locktype. This field also tells us if the thread is
* * waiting for a lock: It will be equal to LOCKWAIT.
- * #endif
+ * #endif
*/
#if defined(UBIK_PAUSE)
if (atrans->flags & TRSETLOCK) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* not found, open it and try to enter in cache */
- afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d", adbase->pathName,
+ afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d", adbase->pathName,
(afid<0)?"SYS":"", (afid<0)?-afid:afid);
fd = open(pbuffer, O_CREAT | O_RDWR, 0600);
if (fd < 0) {
}
if (bestfd) { /* found a usable slot */
tfd = bestfd;
- if (tfd->fd >= 0)
+ if (tfd->fd >= 0)
close(tfd->fd);
tfd->fd = fd;
tfd->refCount = 1; /* us */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*!
- * if this flag is set, then ubik will use only the primary address
- * (the address specified in the CellServDB) to contact other
- * ubik servers. Ubik recovery will not try opening connections
- * to the alternate interface addresses.
+ * if this flag is set, then ubik will use only the primary address
+ * (the address specified in the CellServDB) to contact other
+ * ubik servers. Ubik recovery will not try opening connections
+ * to the alternate interface addresses.
*/
int ubikPrimaryAddrOnly;
* routine called when a non-sync site server goes down; restarts recovery
* process to send missing server the new db when it comes back up.
*
- * \note This routine should not do anything with variables used by non-sync site servers.
+ * \note This routine should not do anything with variables used by non-sync site servers.
*/
int
urecovery_LostServer(void)
/* Every 30 seconds, check all the down servers and mark them
* as up if they respond. When a server comes up or found to
- * not be current, then re-find the the best database and
+ * not be current, then re-find the the best database and
* propogate it.
*/
if ((now = FT_ApproxTime()) > 30 + lastProbeTime) {
}
urecovery_state |= UBIK_RECSYNCSITE;
- /* If a server has just come up or if we have not found the
+ /* If a server has just come up or if we have not found the
* most current database, then go find the most current db.
*/
if (!(urecovery_state & UBIK_RECFOUNDDB)) {
code = close(fd);
if (code)
goto FetchEndCall;
-#endif
+#endif
code = EndDISK_GetFile(rxcall, &tversion);
FetchEndCall:
tcode = rx_EndCall(rxcall, code);
code = rename(tbuffer, pbuffer);
afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
#endif
- if (!code)
+ if (!code)
code = rename(pbuffer, tbuffer);
if (!code) {
(*ubik_dbase->open) (ubik_dbase, 0);
if (code) {
#ifndef OLD_URECOVERY
unlink(pbuffer);
- /*
+ /*
* We will effectively invalidate the old data forever now.
* Unclear if we *should* but we do.
*/
}
/*!
- * \brief send a Probe to all the network address of this server
- *
+ * \brief send a Probe to all the network address of this server
+ *
* \return 0 if success, else return 1
*/
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* apos and alen are not used */
afs_int32
-SDISK_Lock(struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_Lock(struct rx_call *rxcall, struct ubik_tid *atid,
afs_int32 afile, afs_int32 apos, afs_int32 alen, afs_int32 atype)
-{
+{
afs_int32 code;
struct ubik_dbase *dbase;
struct ubik_trans *ubik_thisTrans;
* \brief Write a vector of data
*/
afs_int32
-SDISK_WriteV(struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_WriteV(struct rx_call *rxcall, struct ubik_tid *atid,
iovec_wrt *io_vector, iovec_buf *io_buffer)
{
afs_int32 code, i, offset;
}
afs_int32
-SDISK_Write(struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_Write(struct rx_call *rxcall, struct ubik_tid *atid,
afs_int32 afile, afs_int32 apos, bulkdata *adata)
{
afs_int32 code;
}
afs_int32
-SDISK_Truncate(struct rx_call *rxcall, struct ubik_tid *atid,
+SDISK_Truncate(struct rx_call *rxcall, struct ubik_tid *atid,
afs_int32 afile, afs_int32 alen)
{
afs_int32 code;
}
afs_int32
-SDISK_GetVersion(struct rx_call *rxcall,
+SDISK_GetVersion(struct rx_call *rxcall,
struct ubik_version *aversion)
{
afs_int32 code;
}
afs_int32
-SDISK_GetFile(struct rx_call *rxcall, afs_int32 file,
+SDISK_GetFile(struct rx_call *rxcall, afs_int32 file,
struct ubik_version *version)
{
afs_int32 code;
return code;
}
/* temporarily disabled because it causes problems for migration tool. Hey, it's just
- * a sanity check, anyway.
+ * a sanity check, anyway.
if (ubeacon_AmSyncSite()) {
return UDEADLOCK;
}
}
afs_int32
-SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
+SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
afs_int32 length, struct ubik_version *avers)
{
afs_int32 code;
code = close(fd);
if (code)
goto failed;
-#endif
+#endif
/* sync data first, then write label and resync (resync done by setlabel call).
* This way, good label is only on good database. */
code = rename(tbuffer, pbuffer);
afs_snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP", ubik_dbase->pathName, (file<0)?"SYS":"", (file<0)?-file:file);
#endif
- if (!code)
+ if (!code)
code = rename(pbuffer, tbuffer);
if (!code) {
(*ubik_dbase->open) (ubik_dbase, 0);
* \return zero on success, else 1.
*/
afs_int32
-SDISK_UpdateInterfaceAddr(struct rx_call *rxcall,
- UbikInterfaceAddr *inAddr,
+SDISK_UpdateInterfaceAddr(struct rx_call *rxcall,
+ UbikInterfaceAddr *inAddr,
UbikInterfaceAddr *outAddr)
{
struct ubik_server *ts, *tmp;
}
afs_int32
-SDISK_SetVersion(struct rx_call *rxcall, struct ubik_tid *atid,
- struct ubik_version *oldversionp,
+SDISK_SetVersion(struct rx_call *rxcall, struct ubik_tid *atid,
+ struct ubik_version *oldversionp,
struct ubik_version *newversionp)
{
afs_int32 code = 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* \file
* This system is organized in a hierarchical set of related modules. Modules
* at one level can only call modules at the same level or below.
- *
+ *
* At the bottom level (0) we have R, RFTP, LWP and IOMGR, i.e. the basic
* operating system primitives.
*
* \li DISK--The module responsible for representing atomic transactions
* on the local disk. It maintains a new-value only log.
* \li LOCK--The module responsible for locking byte ranges in the database file.
- *
+ *
* At the next level (2) we have
- *
+ *
* \li RECOVERY--The module responsible for ensuring that all members of a quorum
* have the same up-to-date database after a new synchronization site is
* elected. This module runs only on the synchronization site.
- *
+ *
* At the next level (3) we have
*
* \li REMOTE--The module responsible for interpreting requests from the sync
#define CStampVersion 1 /* meaning set ts->version */
-/*!
+/*!
* \brief Perform an operation at a quorum, handling error conditions.
* \return 0 if all worked and a quorum was contacted successfully
* \return otherwise mark failing server as down and return #UERROR
*
* \note If any server misses an update, we must wait #BIGTIME seconds before
- * allowing the transaction to commit, to ensure that the missing and
- * possibly still functioning server times out and stops handing out old
- * data. This is done in the commit code, where we wait for a server marked
- * down to have stayed down for #BIGTIME seconds before we allow a transaction
- * to commit. A server that fails but comes back up won't give out old data
+ * allowing the transaction to commit, to ensure that the missing and
+ * possibly still functioning server times out and stops handing out old
+ * data. This is done in the commit code, where we wait for a server marked
+ * down to have stayed down for #BIGTIME seconds before we allow a transaction
+ * to commit. A server that fails but comes back up won't give out old data
* because it is sent the sync count along with the beacon message that
* marks it as \b really up (\p beaconSinceDown).
*/
}
afs_int32
-ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans, int aflags,
+ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans, int aflags,
ubik_version *OldVersion,
ubik_version *NewVersion)
{
ts->currentDB = 0; /* db is no longer current; we just missed an update */
continue; /* not up-to-date, don't bother */
}
- code = DISK_SetVersion(ts->disk_rxcid, &atrans->tid, OldVersion,
+ code = DISK_SetVersion(ts->disk_rxcid, &atrans->tid, OldVersion,
NewVersion);
if (code) { /* failure */
rcode = code;
return rcode;
}
-/*!
+/*!
* \brief This routine initializes the ubik system for a set of servers.
* \return 0 for success, or an error code on failure.
* \param serverList set of servers specified; nServers gives the number of entries in this array.
- * \param pathName provides an initial prefix used for naming storage files used by this system.
- * \param dbase the returned structure representing this instance of an ubik; it is passed to various calls below.
+ * \param pathName provides an initial prefix used for naming storage files used by this system.
+ * \param dbase the returned structure representing this instance of an ubik; it is passed to various calls below.
*
* \todo This routine should perhaps be generalized to a low-level disk interface providing read, write, file enumeration and sync operations.
*
ubik_sc[secIndex] = secClass;
}
}
- /* for backwards compat this should keep working as it does now
+ /* for backwards compat this should keep working as it does now
and not host bind */
#if 0
/* This really needs to be up above, where I have put it. It works
rx_SetMinProcs(tservice, 2);
rx_SetMaxProcs(tservice, 3);
- /* start an rx_ServerProc to handle incoming RPC's in particular the
+ /* start an rx_ServerProc to handle incoming RPC's in particular the
* UpdateInterfaceAddr RPC that occurs in ubeacon_InitServerList. This avoids
* the "steplock" problem in ubik initialization. Defect 11037.
*/
(void *)urecovery_Interact, NULL) == 0);
return 0; /* is this correct? - klm */
-#else
+#else
code = LWP_CreateProcess(urecovery_Interact, 16384 /*8192 */ ,
LWP_MAX_PRIORITY - 1, (void *)0, "recovery",
&junk);
* \brief This routine begins a read or write transaction on the transaction
* identified by transPtr, in the dbase named by dbase.
*
- * An open mode of ubik_READTRANS identifies this as a read transaction,
+ * An open mode of ubik_READTRANS identifies this as a read transaction,
* while a mode of ubik_WRITETRANS identifies this as a write transaction.
- * transPtr is set to the returned transaction control block.
- * The readAny flag is set to 0 or 1 by the wrapper functions ubik_BeginTrans() or
+ * transPtr is set to the returned transaction control block.
+ * The readAny flag is set to 0 or 1 by the wrapper functions ubik_BeginTrans() or
* ubik_BeginTransReadAny() below.
*
* \note We can only begin transaction when we have an up-to-date database.
#if defined(UBIK_PAUSE)
/* if we're polling the slave sites, wait until the returns
* are all in. Otherwise, the urecovery_CheckTid call may
- * glitch us.
+ * glitch us.
*/
if (transMode == UBIK_WRITETRANS)
for (count = 75; dbase->flags & DBVOTING; --count) {
/*!
* \brief This routine reads length bytes into buffer from the current position in the database.
- *
+ *
* The file pointer is updated appropriately (by adding the number of bytes actually transferred), and the length actually transferred is stored in the long integer pointed to by length. A short read returns zero for an error code.
*
* \note *length is an INOUT parameter: at the start it represents the size of the buffer, and when done, it contains the number of bytes actually transferred.
}
/*!
- * \brief This routine will flush the io data in the iovec structures.
+ * \brief This routine will flush the io data in the iovec structures.
*
* It first flushes to the local disk and then uses ContactQuorum to write it
* to the other servers.
}
/*!
- * \brief Facility to simplify database caching.
+ * \brief Facility to simplify database caching.
* \return zero if last trans was done on the local server and was successful.
* \return -1 means bad (NULL) argument.
- *
- * If return value is non-zero and the caller is a server caching part of the
+ *
+ * If return value is non-zero and the caller is a server caching part of the
* Ubik database, it should invalidate that cache.
*/
static int
}
/*!
- * "Who said anything about panicking?" snapped Arthur.
+ * "Who said anything about panicking?" snapped Arthur.
* "This is still just the culture shock. You wait till I've settled down
* into the situation and found my bearings. \em Then I'll start panicking!"
* --Authur Dent
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*!
* \brief representation of a ubik database.
*
- * Contains info on low-level disk access routines
+ * Contains info on low-level disk access routines
* for use by disk transaction module.
*/
struct ubik_dbase {
/*!
* \name timer constants
- * time constant for replication algorithms: the R time period is 20 seconds. Both
+ * time constant for replication algorithms: the R time period is 20 seconds. Both
* #SMALLTIME and #BIGTIME must be larger than #RPCTIMEOUT+max(#RPCTIMEOUT, #POLLTIME),
* so that timeouts do not prevent us from getting through to our servers in time.
*
extern int uphys_setlabel(struct ubik_dbase *adbase, afs_int32 afile,
struct ubik_version *aversion);
extern int uphys_sync(struct ubik_dbase *adbase, afs_int32 afile);
-extern void uphys_invalidate(struct ubik_dbase *adbase,
+extern void uphys_invalidate(struct ubik_dbase *adbase,
afs_int32 afid);
/*! \name recovery.c */
/*! \name ubik.c */
extern afs_int32 ContactQuorum_NoArguments(afs_int32 (*proc)
- (struct rx_connection *,
+ (struct rx_connection *,
ubik_tid *),
struct ubik_trans *atrans,
int aflags);
extern afs_int32 ContactQuorum_DISK_Lock(struct ubik_trans *atrans,
int aflags,
- afs_int32 file, afs_int32 position,
+ afs_int32 file, afs_int32 position,
afs_int32 length, afs_int32 type);
extern afs_int32 ContactQuorum_DISK_Write(struct ubik_trans *atrans,
- int aflags,
- afs_int32 file, afs_int32 position,
+ int aflags,
+ afs_int32 file, afs_int32 position,
bulkdata *data);
extern afs_int32 ContactQuorum_DISK_Truncate(struct ubik_trans *atrans,
extern afs_int32 ContactQuorum_DISK_WriteV(struct ubik_trans *atrans,
int aflags,
- iovec_wrt * io_vector,
+ iovec_wrt * io_vector,
iovec_buf *io_buffer);
-extern afs_int32 ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans,
+extern afs_int32 ContactQuorum_DISK_SetVersion(struct ubik_trans *atrans,
int aflags,
ubik_version *OldVersion,
ubik_version *NewVersion);
-
+
extern void panic(char *format, ...)
AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
-extern afs_uint32 ubikGetPrimaryInterfaceAddr(afs_uint32 addr);
+extern afs_uint32 ubikGetPrimaryInterfaceAddr(afs_uint32 addr);
/*\}*/
/*! \name beacon.c */
/*! \name disk.c */
extern void udisk_Debug(struct ubik_debug *aparm);
extern int udisk_Invalidate(struct ubik_dbase *adbase, afs_int32 afid);
-extern int udisk_read(struct ubik_trans *atrans, afs_int32 afile,
+extern int udisk_read(struct ubik_trans *atrans, afs_int32 afile,
void *abuffer, afs_int32 apos, afs_int32 alen);
-extern int udisk_truncate(struct ubik_trans *atrans, afs_int32 afile,
+extern int udisk_truncate(struct ubik_trans *atrans, afs_int32 afile,
afs_int32 alength);
-extern int udisk_write(struct ubik_trans *atrans, afs_int32 afile,
+extern int udisk_write(struct ubik_trans *atrans, afs_int32 afile,
void *abuffer, afs_int32 apos, afs_int32 alen);
-extern int udisk_begin(struct ubik_dbase *adbase, int atype,
+extern int udisk_begin(struct ubik_dbase *adbase, int atype,
struct ubik_trans **atrans);
extern int udisk_commit(struct ubik_trans *atrans);
extern int udisk_abort(struct ubik_trans *atrans);
extern int ubik_BeginTransReadAny(struct ubik_dbase *dbase,
afs_int32 transMode,
struct ubik_trans **transPtr);
-extern int ubik_AbortTrans(struct ubik_trans *transPtr);
+extern int ubik_AbortTrans(struct ubik_trans *transPtr);
extern int ubik_EndTrans(struct ubik_trans *transPtr);
extern int ubik_Read(struct ubik_trans *transPtr, void *buffer,
afs_int32 length);
extern int ubik_Flush(struct ubik_trans *transPtr);
extern int ubik_Write(struct ubik_trans *transPtr, void *buffer,
- afs_int32 length);
+ afs_int32 length);
extern int ubik_Seek(struct ubik_trans *transPtr, afs_int32 fileid,
afs_int32 position);
extern int ubik_Tell(struct ubik_trans *transPtr, afs_int32 * fileid,
afs_int32 * position);
-extern int ubik_Truncate(struct ubik_trans *transPtr,
+extern int ubik_Truncate(struct ubik_trans *transPtr,
afs_int32 length);
-extern int ubik_SetLock(struct ubik_trans *atrans, afs_int32 apos,
+extern int ubik_SetLock(struct ubik_trans *atrans, afs_int32 apos,
afs_int32 alen, int atype);
extern int ubik_WaitVersion(struct ubik_dbase *adatabase,
struct ubik_version *aversion);
char *cellName, afs_int32 sauth,
struct ubik_client **uclientp,
int (*secproc) (struct rx_securityClass *sc,
- afs_int32 scIndex),
- char *funcName,
- afs_int32 gen_rxkad_level,
- afs_int32 maxservers, char *serviceid,
- afs_int32 deadtime, afs_uint32 server,
+ afs_int32 scIndex),
+ char *funcName,
+ afs_int32 gen_rxkad_level,
+ afs_int32 maxservers, char *serviceid,
+ afs_int32 deadtime, afs_uint32 server,
afs_uint32 port, afs_int32 usrvid);
#endif /* UBIK_H */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 syncTime; /* time of above */
struct ubik_version syncVersion; /* sync site's claimed db version */
struct ubik_tid syncTid; /* sync site's claimed tid */
-
+
/* variables from beacon module */
afs_int32 amSyncSite; /* do I think I'm the sync site */
afs_int32 syncSiteUntil; /* when does my sync site mandate expire? */
afs_int32 nServers; /* number of servers participating in vote */
-
+
/* variables from disk module */
afs_int32 lockedPages; /* count of read-locked pages */
afs_int32 writeLockedPages; /* count of write-locked pages */
struct ubik_version localVersion;
afs_int32 activeWrite; /* is there an active write transaction with this as sync site */
afs_int32 tidCounter; /* tid counter field from dbase, or 0 if no write trans. */
-
+
/* variables from the lock module */
afs_int32 anyReadLocks; /* are any read locks held on the current trans, if any */
afs_int32 anyWriteLocks; /* are any write locks held on the current trans, if any */
/* variables from the ubik module */
afs_int32 epochTime; /* time this server started */
/* all network interface addresses of host in host order*/
- afs_int32 interfaceAddr[UBIK_MAX_INTERFACE_ADDR];
+ afs_int32 interfaceAddr[UBIK_MAX_INTERFACE_ADDR];
};
/* data from the per-server structure */
afs_int32 syncTime; /* time of above */
struct ubik_version syncVersion; /* sync site's claimed db version */
struct ubik_tid syncTid; /* sync site's claimed tid */
-
+
/* variables from beacon module */
afs_int32 amSyncSite; /* do I think I'm the sync site */
afs_int32 syncSiteUntil; /* when does my sync site mandate expire? */
afs_int32 nServers; /* number of servers participating in vote */
-
+
/* variables from disk module */
afs_int32 lockedPages; /* count of read-locked pages */
afs_int32 writeLockedPages; /* count of write-locked pages */
struct ubik_version localVersion;
afs_int32 activeWrite; /* is there an active write transaction with this as sync site */
afs_int32 tidCounter; /* tid counter field from dbase, or 0 if no write trans. */
-
+
/* variables from the lock module */
afs_int32 anyReadLocks; /* are any read locks held on the current trans, if any */
afs_int32 anyWriteLocks; /* are any write locks held on the current trans, if any */
/* Vote package interface calls */
Beacon (IN afs_int32 state,
- afs_int32 voteStart,
- ubik_version *Version,
+ afs_int32 voteStart,
+ ubik_version *Version,
ubik_tid *tid) multi = VOTE_BEACON;
DebugOld (OUT ubik_debug_old *db) = VOTE_DEBUG_OLD;
-SDebugOld (IN afs_int32 which,
+SDebugOld (IN afs_int32 which,
OUT ubik_sdebug_old *db) = VOTE_SDEBUG_OLD;
GetSyncSite (IN afs_int32 *site) = VOTE_GETSYNCSITE;
Debug (OUT ubik_debug *db) = VOTE_DEBUG;
-SDebug (IN afs_int32 which,
+SDebug (IN afs_int32 which,
OUT ubik_sdebug *db) = VOTE_SDEBUG;
XDebug (OUT ubik_debug *db,
Commit (IN ubik_tid *tid) = DISK_COMMIT;
-Lock (IN ubik_tid *tid,
- afs_int32 file,
- afs_int32 position,
- afs_int32 length,
+Lock (IN ubik_tid *tid,
+ afs_int32 file,
+ afs_int32 position,
+ afs_int32 length,
afs_int32 type) = DISK_LOCK;
-Write (IN ubik_tid *tid,
- afs_int32 file,
- afs_int32 position,
+Write (IN ubik_tid *tid,
+ afs_int32 file,
+ afs_int32 position,
bulkdata *data) = DISK_WRITE;
GetVersion (OUT ubik_version *Version) = DISK_GETVERSION;
SendFile (IN afs_int32 file,
afs_int32 length,
ubik_version *Version) split = DISK_SENDFILE ;
-
+
Abort (IN ubik_tid *tid) = DISK_ABORT;
ReleaseLocks (IN ubik_tid *tid) = DISK_RELEASELOCKS;
-Truncate (IN ubik_tid *tid,
+Truncate (IN ubik_tid *tid,
afs_int32 file,
afs_int32 length) = DISK_TRUNCATE;
UpdateInterfaceAddr(IN UbikInterfaceAddr* inAddr,
OUT UbikInterfaceAddr* outAddr) multi = DISK_INTERFACEADDR;
-SetVersion (IN ubik_tid *tid,
+SetVersion (IN ubik_tid *tid,
IN ubik_version *OldVersion,
IN ubik_version *NewVersion) = DISK_SETVERSION;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
#if !defined(UKERNEL)
-/*!
+/*!
* \brief use time and pid to try to get some initial randomness.
*/
#define ranstage(x) (x)= (afs_uint32) (3141592621U*((afs_uint32)x)+1)
-/*!
+/*!
* \brief Random number generator and constants from KnuthV2 2d ed, p170
*
* Rules: \n
* c is more or less immaterial. 1 or a is suggested. \n
*
* NB: LOW ORDER BITS are not very random. To get small random numbers,
- * treat result as <1, with implied binary point, and multiply by
+ * treat result as <1, with implied binary point, and multiply by
* desired modulus.
*
* NB: Has to be unsigned, since shifts on signed quantities may preserve
* the sign bit.
- *
+ *
* In this case, m == 2^32, the mod operation is implicit. a == pi, which
* is used because it has some interesting characteristics (lacks any
- * interesting bit-patterns).
+ * interesting bit-patterns).
*/
unsigned int
afs_random(void)
/*!
* \brief Returns int 0..14 using the high bits of a pseudo-random number instead of
* the low bits, as the low bits are "less random" than the high ones...
- *
+ *
* \todo Slight roundoff error exists, an excercise for the reader.
*
- * Need to multiply by something with lots of ones in it, so multiply by
+ * Need to multiply by something with lots of ones in it, so multiply by
* 8 or 16 is right out.
*/
static unsigned int
return 0;
}
-/*!
+/*!
* \brief Destroy an ubik connection.
*
* It calls rx to destroy the component rx connections, then frees the ubik
#define NEED_LOCK 1
#define NO_LOCK 0
-/*!
+/*!
* \brief Create an internal version of ubik_CallIter that takes an additional
* parameter - to indicate whether the ubik client handle has already
* been locked.
*/
static afs_int32
-CallIter(int (*aproc) (), struct ubik_client *aclient,
- afs_int32 aflags, int *apos, long p1, long p2, long p3, long p4,
- long p5, long p6, long p7, long p8, long p9, long p10, long p11,
+CallIter(int (*aproc) (), struct ubik_client *aclient,
+ afs_int32 aflags, int *apos, long p1, long p2, long p3, long p4,
+ long p5, long p6, long p7, long p8, long p9, long p10, long p11,
long p12, long p13, long p14, long p15, long p16, int needlock)
{
afs_int32 code;
p8, p9, p10, p11, p12, p13, p14, p15, p16, NEED_LOCK);
}
-/*!
+/*!
* \brief Call this instead of stub and we'll guarantee to find a host that's up.
*
* \todo In the future, we should also put in a protocol to find the sync site.
*/
afs_int32
-ubik_Call_New(int (*aproc) (), struct ubik_client *aclient,
- afs_int32 aflags, long p1, long p2, long p3, long p4, long p5,
- long p6, long p7, long p8, long p9, long p10, long p11,
+ubik_Call_New(int (*aproc) (), struct ubik_client *aclient,
+ afs_int32 aflags, long p1, long p2, long p3, long p4, long p5,
+ long p6, long p7, long p8, long p9, long p10, long p11,
long p12, long p13, long p14, long p15, long p16)
{
afs_int32 code, rcode;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
newtime = now - diff;
times = ctime(&newtime);
times[24] = 0;
- printf("Last vote started %d secs ago (at %s)\n",
+ printf("Last vote started %d secs ago (at %s)\n",
afs_cast_time_t(diff), times);
}
newtime = now - diff;
times = ctime(&newtime);
times[24] = 0;
- printf(" last vote rcvd %d secs ago (at %s),\n",
+ printf(" last vote rcvd %d secs ago (at %s),\n",
afs_cast_time_t(diff),
times);
}
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
afs_int32
ugen_ClientInit(int noAuthFlag, const char *confDir, char *cellName, afs_int32 sauth,
- struct ubik_client **uclientp,
+ struct ubik_client **uclientp,
int (*secproc) (struct rx_securityClass *, afs_int32),
- char *funcName, afs_int32 gen_rxkad_level,
+ char *funcName, afs_int32 gen_rxkad_level,
afs_int32 maxservers, char *serviceid, afs_int32 deadtime,
afs_uint32 server, afs_uint32 port, afs_int32 usrvid)
{
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
temp = 0;
code = ubik_SAMPLE_Inc(cstruct, 0);
if (code != 0) {
- printf("SAMPLE_Inc #1 failed with code %ld\n",
+ printf("SAMPLE_Inc #1 failed with code %ld\n",
afs_printable_int32_ld(code));
} else {
printf("SAMPLE_Inc #1 succeeded, incremented integer\n");
temp = 0;
code = ubik_SAMPLE_Inc(cstruct, 0);
if (code != 0)
- printf("SAMPLE_Inc #2 failed with code %ld\n",
+ printf("SAMPLE_Inc #2 failed with code %ld\n",
afs_printable_int32_ld(code));
else
printf("SAMPLE_Inc #2 succeeded, incremented integer\n");
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
rx_SetMaxProcs(tservice, 3);
rx_StartServer(1); /* Why waste this idle process?? */
-
+
return 0;
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* be the sync site. Thus, any time that the sync site has not heard from a
* majority of the servers in the last #SMALLTIME seconds, it voluntarily
* relinquishes its role as sync site.
- *
+ *
* While attempting to nominate a new sync site, certain rules apply. First,
* a server can not reply "ok" (return 1 from ServBeacon) to two different
* hosts in less than #BIGTIME seconds; this allows a server that has heard
* lowestHost after BIGTIME seconds to limit the damage if this host
* actually crashes. Finally, we also count in this computation: don't
* pick someone else if we're even better!
- *
+ *
* Note that the test below must be <=, not <, so that we keep refreshing
* lowestTime. Otherwise it will look like we haven't heard from
* lowestHost in a while and another host could slip in. */
ulock_Debug(aparm);
- /* Get the recovery state. The label of the database may not have
+ /* Get the recovery state. The label of the database may not have
* been written yet but set the flag so udebug behavior remains.
* Defect 9477.
*/
ulock_Debug((ubik_debug *)aparm);
- /* Get the recovery state. The label of the database may not have
+ /* Get the recovery state. The label of the database may not have
* been written yet but set the flag so udebug behavior remains.
* Defect 9477.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct filestr *dirname, *ModFiles, *okhostfiles;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
if (verbose >= 3)
printf(" checking %s\n", filename);
if (!IsCompatible(filename, time, length)) {
- /* if the file info has changed , record all the
+ /* if the file info has changed , record all the
*changed files in the ModFiles array*/
if (verbose >= 2)
printf(" getting %s\n", filename);
AddToList(&ModFiles, filename);
- /* now get the file from the server. The received
+ /* now get the file from the server. The received
* file is created under the name filename.NEW */
errcode =
GetFileFromUpServer(conn, filename, uid, gid, mode,
/* returns 1 if the file is upto date else returns 0*/
/*check the dir case more carefully */
int
-IsCompatible(char *filename, afs_int32 time, afs_int32 length)
+IsCompatible(char *filename, afs_int32 time, afs_int32 length)
{
struct stat status;
afs_int32 error;
/* GetFileFromUpServer() - Makes the FetchFile() call and gets the
- * file from the upserver.
+ * file from the upserver.
* Return Values:
* 0 - Alls well
* -1 - Serious error. Quit right away.
- * 1 - Error, but keep trying for the other files
- *
+ * 1 - Error, but keep trying for the other files
+ *
* The file obtained is written to the localized version of the filename.NEW
* and the uid, gid, file mode, access and modification times will be set to
* the passed in values.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
- if (ccode == 1)
+ if (ccode == 1)
host = SHostAddrs[0];
}
return error;
}
-/* Enumerate dir (name) and write dir entry info into temp file.
+/* Enumerate dir (name) and write dir entry info into temp file.
*/
int
update_SendDirInfo(char *name, /* Name of dir to enumerate */
/* AddObject() - Adds the object to the list of exported objects after
* converting to a local path.
*
- * expPath : points to allocated storage in which the exportable path is
+ * expPath : points to allocated storage in which the exportable path is
* passed back.
- * dir : dir name passed in for export
+ * dir : dir name passed in for export
*
*/
static int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* If we're trying to obtain a write lock on a real disk, then the
* aggregate must not be attached by the kernel. If so, unlock it
- * and fail.
+ * and fail.
* WARNING: The code to check for the above has been removed when this
* file was ported from DFS src. It should be put back if
- * this library is used to access hard disks
+ * this library is used to access hard disks
*/
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* usd_DeviceOpen() -- open WinNT device (or regular file)
- *
- * PARAMETERS --
+ *
+ * PARAMETERS --
* oflag -- Various combinations of USD_OPEN_XXX defined in usd.h.
* pmode -- ignored; file's security descriptor set to default on create.
* usdP -- if NULL device is immediately closed after being opened.
attr = 0;
/* should we always set:
- * FILE_FLAG_NO_BUFFERING?
+ * FILE_FLAG_NO_BUFFERING?
* FILE_FLAG_RANDOM_ACCESS?
*/
/* If we're trying to obtain a write lock on a real disk, then the
* aggregate must not be attached by the kernel. If so, unlock it
- * and fail.
+ * and fail.
* WARNING: The code to check for the above has been removed when this
* file was ported from DFS src. It should be put back if
- * this library is used to access hard disks
+ * this library is used to access hard disks
*/
if (code == 0 && usdP)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*------------------------------------------------------------------------*/
static void
-ChangeList(struct Acl *a_al, afs_int32 a_plus, char *a_name,
+ChangeList(struct Acl *a_al, afs_int32 a_plus, char *a_name,
afs_int32 a_rights)
{ /*ChangeList */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* ------------------------ Exported functions -----------------------
*/
-extern afs_int32 uss_acl_SetAccess(char *a_access, int a_clear,
+extern afs_int32 uss_acl_SetAccess(char *a_access, int a_clear,
int a_negative);
/*
* Summary:
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*------------------------------------------------------------------------*/
char *
-uss_common_FieldCp(char *a_to, char *a_from, char a_separator,
+uss_common_FieldCp(char *a_to, char *a_from, char a_separator,
int a_maxChars, int *a_overflowP)
{ /*uss_common_FieldCp */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* char *a_path : Pathname to ancestorize.
* char *a_parentBuff : Ptr to parent buffer to use.
* char **a_componentPP : Ptr to the final component.
- *
+ *
*
* Returns:
* Ptr to the buffer containing the parent dir name.
*------------------------------------------------------------------------*/
afs_int32
-uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff,
+uss_fs_SetVolStat(char *a_mountpoint, char *a_volStatBuff,
afs_int32 a_volStatBuffBytes)
{ /*uss_fs_SetVolStat */
#ifdef USS_FS_DB
};
/*
- * Build a list of tokens, delete the bad ones (the ones to remove from the
+ * Build a list of tokens, delete the bad ones (the ones to remove from the
* permissions list,) destroy all tokens, and then re-register the good ones.
* Ugly, but it works.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* ------------------------ Exported functions -----------------------
*/
-extern afs_int32 uss_fs_GetACL(char *a_dirPath, char *a_aclBuff,
+extern afs_int32 uss_fs_GetACL(char *a_dirPath, char *a_aclBuff,
afs_int32 a_aclBuffBytes);
/*
* Summary:
* -1 otherwise, with errno set to the error.
*/
-extern afs_int32 uss_fs_SetACL(char *a_dirPath, char *a_aclBuff,
+extern afs_int32 uss_fs_SetACL(char *a_dirPath, char *a_aclBuff,
afs_int32 a_aclBuffBytes);
/*
* Summary:
* -1 otherwise, with errno set to the error.
*/
-extern afs_int32 uss_fs_MkMountPoint(char *a_volname, char *a_cellname,
+extern afs_int32 uss_fs_MkMountPoint(char *a_volname, char *a_cellname,
afs_int32 a_rw, char *a_mountpoint);
/*
* Summary: *NEW*
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
ka_StringToKey(a_passwd, uss_Cell, &ktc_key);
memcpy(&key, &ktc_key, sizeof(key)); /* XXX - we could just cast */
-
+
if (!uss_DryRun) {
if (uss_verbose)
fprintf(stderr, "Adding user '%s' to the Authentication DB\n",
"%s: KAM_CreateUser: user='%s', CreatorInstance='%s', %d bytes\n",
rn, a_user, CreatorInstance, strlen(CreatorInstance));
#endif /* USS_KAUTH_DB_INSTANCE */
- code = ubik_KAM_CreateUser(uconn_kauthP, 0, a_user,
+ code = ubik_KAM_CreateUser(uconn_kauthP, 0, a_user,
UserInstance, /*set by CheckUsername() */
key);
if (code) {
/*
* Use the AuthServer's own routine to decide if the parsed user name
* is legal. Specifically, it can't have any weird characters or
- * embedded instance or cell names.
+ * embedded instance or cell names.
*/
code = ka_ParseLoginName(uss_User, UserPrincipal, UserInstance, UserCell);
if (strlen(UserInstance) > 0) {
*/
afs_int32
-uss_kauth_SetFields(char *username, char *expirestring, char *reuse,
+uss_kauth_SetFields(char *username, char *expirestring, char *reuse,
char *failures, char *lockout)
{
#ifdef USS_KAUTH_DB
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <string.h>
#include <stdarg.h>
-
+
#include <afs/kautils.h> /*MAXKTCREALMLEN*/
#undef USS_PROCS_DB
#undef USS_PROCS_DB_INSTANCE
*------------------------------------------------------------------------*/
afs_int32
-uss_procs_EchoToFile(char *a_path, char *a_mode, char *a_owner,
+uss_procs_EchoToFile(char *a_path, char *a_mode, char *a_owner,
char *a_content)
{ /*uss_procs_EchoToFile */
* static Copy
*
* Description:
- * Copies the "from" file to the "to" file and sets the mode.
+ * Copies the "from" file to the "to" file and sets the mode.
*
* Arguments:
* a_from : File to copy from.
cd[1] = '\0';
}
- /*
+ /*
* We now have the current dir (cd). Search all of the given
* subdirs (by G in template), count the number of entries in
* each and pick the minimum.
uss_procs_PrintErr(int a_lineNum, char *a_fmt, ... )
{ /*uss_procs_PrintErr */
va_list ap;
-
+
va_start(ap, a_fmt);
uss_syntax_err++;
fprintf(stderr, "%s: Template file, line %d: ", uss_whoami, a_lineNum);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* ------------------------ Exported functions -----------------------
*/
-extern afs_int32 uss_procs_BuildDir(char *a_path, char *a_mode,
+extern afs_int32 uss_procs_BuildDir(char *a_path, char *a_mode,
char *a_owner, char *a_access);
/*
* Summary:
* Other error code if problem occurred in lower-level call.
*/
-extern afs_int32 uss_procs_CpFile(char *a_path, char *a_mode,
+extern afs_int32 uss_procs_CpFile(char *a_path, char *a_mode,
char *a_owner, char *a_proto);
/*
* Summary:
* Other error code if problem occurred in lower-level call.
*/
-extern afs_int32 uss_procs_EchoToFile(char *a_path, char *a_mode,
+extern afs_int32 uss_procs_EchoToFile(char *a_path, char *a_mode,
char *a_owner, char *a_content);
/*
* Summary:
* Other error code if problem occurred in lower-level call.
*/
-extern afs_int32 uss_procs_SetLink(char *a_path1, char *a_path2,
+extern afs_int32 uss_procs_SetLink(char *a_path1, char *a_path2,
char a_type);
/*
* Summary:
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Numeric partition name, or -1 on failure.
*/
-extern afs_int32 uss_vol_CreateVol(char *a_volname, char *a_server,
- char *a_partition, char *a_quota,
- char *a_mpoint, char *a_owner,
+extern afs_int32 uss_vol_CreateVol(char *a_volname, char *a_server,
+ char *a_partition, char *a_quota,
+ char *a_mpoint, char *a_owner,
char *a_acl);
/*
* Summary:
* Other error code if problem occurred in lower-level call.
*/
-extern afs_int32 uss_vol_DeleteVol(char *a_volName, afs_int32 a_volID,
- char *a_servName, afs_int32 a_servID,
+extern afs_int32 uss_vol_DeleteVol(char *a_volName, afs_int32 a_volID,
+ char *a_servName, afs_int32 a_servID,
char *a_partName, afs_int32 a_partID);
/*
* Summary:
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* This optimization is both easy to understand
* and cheap to execute, so we go ahead and do
* it.
- *
+ *
*/
if (previous) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* strcompose - concatenate strings passed to it.
- * Input:
+ * Input:
* buf: storage for the composed string. Any data in it will be lost.
* len: length of the buffer.
* ...: variable number of string arguments. The last argument must be
- * NULL.
+ * NULL.
* Returns buf or NULL if the buffer was not sufficiently large.
*/
char *
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
-/* initDirPathArray() -- Initializes the afs dir paths for the
+/* initDirPathArray() -- Initializes the afs dir paths for the
* server and client installations.
*
* For NT these are determined dynamically; for Unix they are static.
/* getDirPath - returns a const char pointer to the requested string
* from the internal path array.
- * string_id - index into the path array
+ * string_id - index into the path array
*/
const char *
getDirPath(afsdir_id_t string_id)
LocalizePathHead(const char **path, const char **relativeTo)
{
struct canonmapping *map;
-
+
if (**path == '/') {
for (map = CanonicalTranslations; map->local != NULL; map++) {
int canonlength = strlen(map->canonical);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
AFSDIR_PATHSTRING_MAX
} afsdir_id_t;
-/* getDirPath() returns a pointer to a string from an internal array of path strings
+/* getDirPath() returns a pointer to a string from an internal array of path strings
*/
const char *getDirPath(afsdir_id_t string_id);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define EHOSTUNREACH WSAEHOSTUNREACH
#ifdef ENOTEMPTY
#undef ENOTEMPTY
-#endif
+#endif
#define ENOTEMPTY WSAENOTEMPTY
#define EPROCLIM WSAEPROCLIM
#define EUSERS WSAEUSERS
#define ESTALE WSAESTALE
#define EREMOTE WSAEREMOTE
-/*
- * New codes
+/*
+ * New codes
* Highest known value is WSA_QOS_RESERVED_PETYPE (WSABASEERR + 1031)
*/
#define AFS_NT_ERRNO_BASE WSABASEERR + 1100
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define VSALVAGE 101 /* Volume needs salvage */
#define VNOVNODE 102 /* Bad vnode number quoted */
-#define VNOVOL 103 /* Volume not attached, doesn't exist,
+#define VNOVOL 103 /* Volume not attached, doesn't exist,
* not created or not online */
#define VVOLEXISTS 104 /* Volume already exists */
#define VNOSERVICE 105 /* Volume is not in service (i.e. it's
* propagated to the application level */
#define VMOVED 111 /* Volume has moved to another server; do a VGetVolumeInfo
* to THIS server to find out where */
-#define VIO 112 /* Vnode temporarily unaccessible, but not known
+#define VIO 112 /* Vnode temporarily unaccessible, but not known
* to be permanently bad. */
#define VSALVAGING 113 /* Volume is being salvaged (demand attach fs) */
#define VRESTRICTED 120 /* Volume is restricted from using one or more
* of the given residencies; do a
* vos examine to find out the current
* restrictions. */
-#define VRESTARTING -100 /* server is restarting, otherwise similar to
+#define VRESTARTING -100 /* server is restarting, otherwise similar to
* VBUSY above. This is negative so that old
* cache managers treat it as "server is down" */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
- * FilepathNormalizeEx() -- normalize file path; i.e., use only forward (or only
+ * FilepathNormalizeEx() -- normalize file path; i.e., use only forward (or only
* backward) slashes, remove multiple and trailing slashes.
*/
void
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include "afsutil.h"
/* This version of base64 gets it right and starts converting from the low
- * bits to the high bits.
+ * bits to the high bits.
*/
/* This table needs to be in lexical order to efficiently map back from
* characters to the numerical value.
else
fstabent.fs_type = FSTAB_RW;
fstabent.fs_vfstype = mntent->f_fstypename;
-
+
mntent++;
mntcnt--;
return &fstabent;
* krb_get_lrealm takes a pointer to a string, and a number, n. It fills
* in the string, r, with the name of the nth realm specified on the
* first line of the kerberos config file (KRB_CONF, defined in "krb.h").
- * It returns 0 (KSUCCESS) on success, and KFAILURE on failure.
+ * It returns 0 (KSUCCESS) on success, and KFAILURE on failure.
*
- * On the kerberos version if the config file does not exist, and if n=1, a
+ * On the kerberos version if the config file does not exist, and if n=1, a
* successful return will occur with r = KRB_REALM (also defined in "krb.h").
*
*/
return exclude;
}
-int
+int
afs_is_foreign_ticket_name(char *tname, char *tinst, char * tcell, char *localrealm)
{
int foreign = 0;
}
}
- /* If yes, then make sure that the name is not present in
+ /* If yes, then make sure that the name is not present in
* an exclusion list */
if (lrealm_match) {
if (tinst && tinst[0])
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return tbuffer;
}
-/* the parameter is a pointer to a buffer containing a string of
-** bytes of the form
+/* the parameter is a pointer to a buffer containing a string of
+** bytes of the form
** w.x.y.z # machineName
-** returns the network interface in network byte order
+** returns the network interface in network byte order
*/
afs_uint32
extractAddr(char *line, int maxSize)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* Add_RelDate_to_Time
- * Returns current time with a relative time added. Note that the
+ * Returns current time with a relative time added. Note that the
* computation adds in most significant fields first, i.e. year, month
* day etc. Addition of least significant fields would produce different
* results (depending on the data).
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (tmask & KTIME_NOW)
return 0;
- /* Use probe to fill in members of *tsp. Add 23 hours each iteration until
- * time_next is correct. Only add 23 hrs to avoid skipping spring
+ /* Use probe to fill in members of *tsp. Add 23 hours each iteration until
+ * time_next is correct. Only add 23 hrs to avoid skipping spring
* daylight savings time day */
for (probe = start;; probe += (23 * 3600)) {
tsp = localtime(&probe); /* find out what UTC time "probe" is */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#else
#ifdef AFS_NT40_ENV
#include <winsock2.h>
-#else
+#else
#ifdef __FreeBSD__
#include <sys/types.h>
#endif
int ParseNetInfoFile_int(afs_uint32 *, afs_uint32 *, afs_uint32 *,
int, char reason[], const char *,
int);
-/*
- * The line parameter is a pointer to a buffer containing a string of
- * bytes of the form
+/*
+ * The line parameter is a pointer to a buffer containing a string of
+ * bytes of the form
** w.x.y.z # machineName
* returns the network interface IP Address in NBO
*/
/* parseNetRestrictFile()
* Get a list of IP addresses for this host removing any address found
* in the config file (fileName parameter): /usr/vice/etc/NetRestrict
- * for clients and /usr/afs/local/NetRestrict for servers.
+ * for clients and /usr/afs/local/NetRestrict for servers.
*
* Returns the number of valid addresses in outAddrs[] and count in
* nAddrs. Returns 0 on success; or 1 if the config file was not
int
parseNetRestrictFile_int(afs_uint32 outAddrs[], afs_uint32 * mask,
afs_uint32 * mtu, afs_uint32 maxAddrs,
- afs_uint32 * nAddrs, char reason[],
+ afs_uint32 * nAddrs, char reason[],
const char *fileName, const char *fileName_ni)
{
FILE *fp;
return -1;
}
i = 0;
- if ((neaddrs < MAXIPADDRS) && fileName_ni)
- i = ParseNetInfoFile_int(&(eAddrs[neaddrs]), &(eMask[neaddrs]),
+ if ((neaddrs < MAXIPADDRS) && fileName_ni)
+ i = ParseNetInfoFile_int(&(eAddrs[neaddrs]), &(eMask[neaddrs]),
&(eMtu[neaddrs]), MAXIPADDRS-neaddrs, reason,
fileName_ni, 1);
int
parseNetRestrictFile(afs_uint32 outAddrs[], afs_uint32 * mask,
afs_uint32 * mtu, afs_uint32 maxAddrs,
- afs_uint32 * nAddrs, char reason[],
+ afs_uint32 * nAddrs, char reason[],
const char *fileName)
{
return parseNetRestrictFile_int(outAddrs, mask, mtu, maxAddrs, nAddrs, reason, fileName, NULL);
/*
* this function reads in stuff from InterfaceAddr file in
* /usr/vice/etc ( if it exists ) and verifies the addresses
- * specified.
- * 'final' contains all those addresses that are found to
+ * specified.
+ * 'final' contains all those addresses that are found to
* be valid. This function returns the number of valid
* interface addresses. Pulled out from afsd.c
*/
int
ParseNetInfoFile_int(afs_uint32 * final, afs_uint32 * mask, afs_uint32 * mtu,
- int max, char reason[], const char *fileName,
+ int max, char reason[], const char *fileName,
int fakeonly)
{
"afs:Too many interfaces. The current kernel configuration supports a maximum of %d interfaces\n",
max);
} else if (fake) {
- if (!fake)
+ if (!fake)
fprintf(stderr, "Client (2) also has address %s\n", line);
final[count] = addr;
mask[count] = 0xffffffff;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* re_exec(s)
* char *s;
* ... returns 1 if the string s matches the last compiled regular
- * expression,
+ * expression,
* 0 if the string s failed to match the last compiled
* regular expression, and
- * -1 if the compiled regular expression was invalid
+ * -1 if the compiled regular expression was invalid
* (indicating an internal error).
*
* The strings passed to both re_comp and re_exec may have trailing or
* matches that character.
* 4. A nonempty string s bracketed [s] (or [^s]) matches any
* character in (or not in) s. In s, \ has no special meaning,
- * and ] may only appear as the first letter. A substring
+ * and ] may only appear as the first letter. A substring
* a-b, with a and b in ascending ASCII order, stands for
* the inclusive range of ASCII characters.
* 5. A regular expression of form 1-4 followed by * matches a
return (0);
}
-/*
+/*
* try to match the next thing in the dfa
*/
static int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Vice 1 Response:
* 0: file identifier assigned (for subsequent
* messages dealing with open files).
- * 1: pathname of the local, cached file.
+ * 1: pathname of the local, cached file.
* im_error
* Note: the returned filename is not created, truncated(?),
* or otherwise fiddled with by the kernel. It must
/* The following error codes are set by Venus when a pathname argument supplied
- * by the kernel resolves to an absolute pathname outside of the name space
+ * by the kernel resolves to an absolute pathname outside of the name space
* of this venus. The resolved absolute pathname is returned in argument 0.
* The kernel is expected to retry the system call with this new information.
* The kernel never passes this error on to the original issuer of the system
#include <des/stats.h>
#ifndef AFS_PTHREAD_ENV
-struct rxkad_stats rxkad_stats = { { 0 } };
+struct rxkad_stats rxkad_stats = { { 0 } };
#else
rxkad_stats_t rxkad_stats = { { 0 } };
#endif
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
int
-LogThreadNum(void)
+LogThreadNum(void)
{
return (*threadNumProgram) ();
}
LogLevel *= 5;
#if defined(AFS_PTHREAD_ENV)
- if (LogLevel > 1 && threadNumProgram != NULL &&
+ if (LogLevel > 1 && threadNumProgram != NULL &&
threadIdLogs == 0) {
threadIdLogs = 1;
}
time_t t;
struct stat buf;
FT_GetTimeOfDay(&Start, 0);
- t = Start.tv_sec;
+ t = Start.tv_sec;
TimeFields = localtime(&t);
if (fileName) {
if (strncmp(fileName, (char *)&ourName, strlen(fileName)))
#include <sys/socket.h>
#endif
-/* This is an enhanced version of the *printf functionality shipped
+/* This is an enhanced version of the *printf functionality shipped
* with Heimdal. In addition to the standard Unix formatting types
* this version also supports Microsoft's I32 and I64 type modifiers
- * and the OpenAFS I type which is used to generate output from
- * network byte order IPv4 addresses (either dotted notation or
+ * and the OpenAFS I type which is used to generate output from
+ * network byte order IPv4 addresses (either dotted notation or
* hostname lookups. Implementation details follow:
*
* - Actually obeys the length limit, which (unfortunately) many
* implementations of snprintf do not.
- *
+ *
* - Supports all the standard format specifiers for integers
* (d, i, o, u, x, X), floating-point values (f, e, E, g, G),
* and strings and characters (c, s, %), plus a few unusual
* but useful ones described below.
*
- * - The Microsoft integral size modifiers I32 and I64 are
+ * - The Microsoft integral size modifiers I32 and I64 are
* supported. I32 is equivalent to 'l'.
* I64 is equivalent to 'll'.
- *
+ *
* - Supports all the standard flags (-, 0, +, space, #). These
* flags are ignored if used when they are not appropriate.
- *
+ *
* - Supports the standard size modifiers for short (h), long (h),
* and double (L) arguments. These modifiers are ignored if used
* when they are not appropriate.
- *
+ *
* - Supports minimum field width and precision, where appropriate,
* including the use of '*' to specify a value given as an argument
* instead of in the format string. There is a maximum precision
* of 100 digits.
- *
+ *
* - The 'p' specifier for printing pointers is implemented using
* compile time knowledge. (AFS_64BITUSERPOINTER_ENV)
*
* - Floating-point specifier (%e, %f, %g) are implemented by
* calling the standard sprintf, and thus may be unsafe.
- *
+ *
* - The '%...$' notation is used primarily when the format string
* is specified by the user, who knows but cannot change the order
* of the arguments. Such usage is inherently dangerous and
* - Passing in a format and an NULL buffer is supported. This
* will compute the size of the buffer required by the format
* and the provided input parameters.
- *
+ *
* The custom format specifier '%I' is supported. This specifier
* takes as its argument an unsigned long integer containing an
* IPv4 address in network byte order. The address is rendered
* either as a hostname or as a dotted quad, as follows:
- *
+ *
* - If precision is nonzero or unspecified, a hostname lookup
* is attempted; if it is successful, the hostname is printed.
* If the hostname lookup fails, the address is printed in
* dotted-quad notation.
- *
+ *
* - If precision is explicitly specified as 0, then the hostname
* lookup is skipped, and dotted-quad notation is always used.
- *
+ *
* - If a hostname is to be printed:
* + The precision controls the maximum number of characters
* printed, as with %s.
* will be forced to upper case before printing. If both
* '#' and '+' are given, the '+' flag will be ignored.
* + The '0' and ' ' flags have no effect.
- *
+ *
* - If a dotted quad is to be printed:
* + The precision has no effect; dotted quads are always
* 7 to 12 characters in length, depending on the value
* A test program exists in src/util/tests/snprintf_tests.c.
*/
-#define MAXPREC 100
+#define MAXPREC 100
enum format_flags {
minus_flag = 1,
no such wording for %x. This would mean that %#.o would
output "0", but %#.x "". This does not make sense, and is
also not what other printf implementations are doing. */
-
+
if(prec <= nlen && nstr[nstart] != '0' && nstr[nstart] != '\0')
prec = nlen + 1;
}
width -= prec;
else
width -= nlen;
-
+
if(use_alternative(flags, num, base))
width -= 2;
-
+
if(signchar != '\0')
width--;
-
+
/* pad to width */
len += pad(state, width, ' ');
}
} else
/* pad to prec with zeros */
len += pad(state, prec - nlen, '0');
-
+
while(nstr[nstart] != '\0') {
(*state->append_char)(state, nstr[nstart++]);
++len;
}
-
+
if(flags & minus_flag)
len += pad(state, width - len, ' ');
return 0;
}
-#define MAXPREC 100
+#define MAXPREC 100
static int
append_float(struct snprintf_state *state,
char type,
int len = 0;
char fbuf[20], xbuf[MAXPREC + 21];
- sprintf(fbuf, "%%%s%s.*L%c",
+ sprintf(fbuf, "%%%s%s.*L%c",
(flags & plus_flag) ? "+" : ((flags & space_flag) ? " " : ((flags & minus_flag) ? "-" : "")),
(flags & alternate_flag) ? "#" : "", type);
if (prec == -1)
len = (int)strlen(x);
if (prec != -1 && prec < len)
width = prec;
- else
+ else
width = len;
if (flags & alternate_flag) {
for (y = x; *y; y++)
}
/* typecast to whatever '%u' is! */
sprintf(xbuf, x, (unsigned int)((arg & 0xff000000) >> 24),
- (unsigned int)((arg & 0x00ff0000) >> 16),
+ (unsigned int)((arg & 0x00ff0000) >> 16),
(unsigned int)((arg & 0x0000ff00) >> 8),
(unsigned int)(arg & 0x000000ff));
len = append_string(state, (unsigned char *)xbuf, 0, -1, 0);
- }
+ }
return len;
}
long_long_flag = 1;
else if (sizeof(void *) == sizeof(afs_uint32))
long_flag = 1;
- else
+ else
long_flag = 1;
}
/*
* Copyright 2006, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* Copyright (c) 2002 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- *
+ *
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- *
+ *
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* afs_wsInit - LWP version
* Initialize the winsock 2 environment.
- *
+ *
* Returns 0 on success, -1 on error.
*/
int
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (caps.Capabilities_val) {
printf("Capabilities:\n");
if (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS) {
- printf("Error Translation\n");
+ printf("Error Translation\n");
}
printf("\n");
}
}
static void
-PrintCellServDB(struct rx_connection *aconn)
+PrintCellServDB(struct rx_connection *aconn)
{
afs_int32 index;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
- cmd_AddParm(ts, "-refcounts", CMD_FLAG, CMD_OPTIONAL,
+ cmd_AddParm(ts, "-refcounts", CMD_FLAG, CMD_OPTIONAL,
"print only cache entries with positive reference counts");
- cmd_AddParm(ts, "-callbacks", CMD_FLAG, CMD_OPTIONAL,
+ cmd_AddParm(ts, "-callbacks", CMD_FLAG, CMD_OPTIONAL,
"print only cache entries with callbacks");
- cmd_AddParm(ts, "-ctime", CMD_FLAG, CMD_OPTIONAL,
+ cmd_AddParm(ts, "-ctime", CMD_FLAG, CMD_OPTIONAL,
"print human readable expiration time");
-
+
cmd_AddParm(ts, "-addrs", CMD_FLAG, CMD_OPTIONAL,
"print only host interfaces");
cmd_AddParm(ts, "-cache", CMD_FLAG, CMD_OPTIONAL,
"print only cache configuration");
- cmd_AddParm(ts, "-cellservdb", CMD_FLAG, CMD_OPTIONAL,
+ cmd_AddParm(ts, "-cellservdb", CMD_FLAG, CMD_OPTIONAL,
"print only cellservdb info");
cmd_Dispatch(argc, argv);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
struct sigaction nsa;
-
+
sigemptyset(&nsa.sa_mask);
nsa.sa_handler = SIG_DFL;
nsa.sa_flags = SA_FULLDUMP;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return error;
}
-/*
+/*
* The Windows version of UuidCmd displays the UUID.
* When the UNIX version is updated to do the same
* be sure to replace the CMD_REQUIRED flag with
- * CMD_OPTIONAL in the cmd_AddParam(-generate) call
+ * CMD_OPTIONAL in the cmd_AddParam(-generate) call
*/
static int
UuidCmd(struct cmd_syndesc *as, void *arock)
blob.in_size = 0;
blob.out_size = 0;
-
+
if (as->parms[0].items) {
if (geteuid()) {
fprintf (stderr, "Permission denied: requires root access.\n");
* With a threshold of 0, the cache is always bypassed. With a threshold of -1,
* cache bypass is disabled.
*/
-
+
static int
BypassThresholdCmd(struct cmd_syndesc *as, void *arock)
{
afs_int32 code;
struct ViceIoctl blob;
afs_int32 threshold_i, threshold_o;
- char *tp;
-
+ char *tp;
+
/* if new threshold supplied, then set and confirm, else,
* get current threshold and print
*/
-
+
if(as->parms[0].items) {
int digit, ix, len;
-
+
tp = as->parms[0].items->data;
len = strlen(tp);
- digit = 1;
+ digit = 1;
for(ix = 0; ix < len; ++ix) {
if(!isdigit(tp[0])) {
digit = 0;
return EINVAL;
}
threshold_i = atoi(tp);
- if(ix > 9 && threshold_i < 2147483647)
+ if(ix > 9 && threshold_i < 2147483647)
threshold_i = 2147483647;
blob.in = (char *) &threshold_i;
blob.in_size = sizeof(threshold_i);
if (code) {
Die(errno, NULL);
return 1;
- } else {
+ } else {
printf("Cache bypass threshold %d", threshold_o);
if(threshold_o == -1)
printf(" (disabled)");
afs_int32 code;
struct ViceIoctl blob;
afs_int32 temp;
-
+
if (!as->parms[0].items && !as->parms[1].items) {
fprintf(stderr, "%s: syntax error in precache cmd.\n", pn);
return 1;
Die(errno, NULL);
return 1;
}
-
+
printf("New precache size set.\n");
return 0;
}
percentFiles, filesUsed, parms[2]);
if (flags == 2){
printf(" afs_cacheFiles: %10d\n", parms[2]);
- printf(" IFFree: %10d\n", parms[3]);
- printf(" IFEverUsed: %10d\n", parms[4]);
- printf(" IFDataMod: %10d\n", parms[5]);
+ printf(" IFFree: %10d\n", parms[3]);
+ printf(" IFEverUsed: %10d\n", parms[4]);
+ printf(" IFDataMod: %10d\n", parms[5]);
printf(" IFDirtyPages: %10d\n", parms[6]);
- printf(" IFAnyPages: %10d\n", parms[7]);
+ printf(" IFAnyPages: %10d\n", parms[7]);
printf(" IFDiscarded: %10d\n", parms[8]);
printf(" DCentries: %10d\n", parms[9]);
- printf(" 0k- 4K: %10d\n", parms[10]);
- printf(" 4k- 16k: %10d\n", parms[11]);
- printf(" 16k- 64k: %10d\n", parms[12]);
- printf(" 64k- 256k: %10d\n", parms[13]);
- printf(" 256k- 1M: %10d\n", parms[14]);
- printf(" >=1M: %10d\n", parms[15]);
+ printf(" 0k- 4K: %10d\n", parms[10]);
+ printf(" 4k- 16k: %10d\n", parms[11]);
+ printf(" 16k- 64k: %10d\n", parms[12]);
+ printf(" 64k- 256k: %10d\n", parms[13]);
+ printf(" 256k- 1M: %10d\n", parms[14]);
+ printf(" >=1M: %10d\n", parms[15]);
}
if (percentBlocks > 90)
printf("[cache size usage over 90%%, consider increasing cache size]\n");
if (percentFiles > 90)
printf("[cache file usage over 90%%, consider increasing '-files' argument to afsd]\n");
-
+
return 0;
}
afs_int32 hostAddr;
struct hostent *thp;
int setp;
-
+
ti = as->parms[0].items;
setp = 1;
if (ti) {
hostAddr = 0; /* means don't set host */
setp = 0; /* aren't setting host */
}
-
+
/* now do operation */
blob.in_size = sizeof(afs_int32);
blob.out_size = sizeof(afs_int32);
blob.in = (char *) &hostAddr;
blob.out = (char *) &hostAddr;
-
+
code = pioctl(0, VIOC_CBADDR, &blob, 1);
if (code < 0) {
Die(errno, 0);
struct cmd_item *ti;
afs_int32 hostAddr;
struct hostent *thp;
-
+
ti = as->parms[0].items;
thp = hostutil_GetHostByName(ti->data);
if (!thp) {
return 1;
}
else memcpy(&hostAddr, thp->h_addr, sizeof(afs_int32));
-
+
/* now do operation */
blob.in_size = sizeof(afs_int32);
blob.out_size = sizeof(afs_int32);
blob.in = (char *) &hostAddr;
blob.out = (char *) &hostAddr;
-
+
code = pioctl(0, VIOC_NFS_NUKE_CREDS, &blob, 1);
if (code < 0) {
Die(errno, 0);
afs_int32 code;
code = ugen_ClientInit(noAuthFlag, (char *) AFSDIR_CLIENT_ETC_DIRPATH,
- info->name, 0, &uclient,
+ info->name, 0, &uclient,
NULL, pn, rxkad_clear,
VLDB_MAXSERVERS, AFSCONF_VLDBSERVICE, 50,
0, 0, USER_SERVICE_ID);
struct cmd_item *ti;
for (ti = as->parms[0].items; ti; ti = ti->next) {
struct VenusFid vfid;
-
+
blob.out_size = sizeof(struct VenusFid);
blob.out = (char *) &vfid;
blob.in_size = 0;
-
+
if (0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) {
printf("File %s (%u.%u.%u) contained in volume %u\n",
ti->data, vfid.Fid.Volume, vfid.Fid.Vnode, vfid.Fid.Unique,
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
-#if !defined(AFS_SUN3_ENV) && !defined(sys_vax_ul43)
+#if !defined(AFS_SUN3_ENV) && !defined(sys_vax_ul43)
#include <time.h>
/*#ifdef AFS_AIX_ENV*/
#include <sys/time.h>
*/
void
-dce1_error_inq_text(afs_uint32 status_to_convert,
+dce1_error_inq_text(afs_uint32 status_to_convert,
char *error_text, int *status)
{
unsigned short facility_code;
#if !defined(AFS_SGI_ENV)
int
-afs_syscall(long call, long parm0, long parm1, long parm2, long parm3,
+afs_syscall(long call, long parm0, long parm1, long parm2, long parm3,
long parm4, long parm5, long parm6)
{
int code, rval;
}
int
-icl_CreateSet(char *name, struct afs_icl_log *baseLogp,
+icl_CreateSet(char *name, struct afs_icl_log *baseLogp,
struct afs_icl_log *fatalLogp, struct afs_icl_set **outSetpp)
{
return icl_CreateSetWithFlags(name, baseLogp, fatalLogp, /*flags */ 0,
* those references will be released.
*/
int
-icl_CreateSetWithFlags(char *name, struct afs_icl_log *baseLogp,
- struct afs_icl_log *fatalLogp, afs_uint32 flags,
+icl_CreateSetWithFlags(char *name, struct afs_icl_log *baseLogp,
+ struct afs_icl_log *fatalLogp, afs_uint32 flags,
struct afs_icl_set **outSetpp)
{
struct afs_icl_set *setp;
}
int
-icl_EnumerateSets(int (*aproc) (char *, void *, struct afs_icl_set *),
+icl_EnumerateSets(int (*aproc) (char *, void *, struct afs_icl_set *),
void *arock)
{
struct afs_icl_set *tp, *np;
break;
case ICL_OP_SS_FREE: /* deassert design for log */
- /*
+ /*
* if we are already in this state, do nothing; otherwise
* deassert desire for log
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#include <stdlib.h> /* for malloc() */
#include <afs/cmd.h>
-
+
#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
/* Here be hacks. */
#ifdef AFS_LINUX24_ENV
* kseg_to_phys()
* is_kseg_va()
* is_seg1_va()
- *
+ *
* when _KERNEL is defined, and expressions otherwise. Since need
* to define _KERNEL, we redefine these kernel functions as macros
* for the expressions that we would have gotten if _KERNEL had not
{
afs_int32 code = 0;
-#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
if (as->parms[0].items) { /* -kobj */
obj = as->parms[0].items->data;
}
perror("lseek");
exit(1);
}
- if (loc == 0)
- printf("WARNING: Read failed: loc=0\n");
+ if (loc == 0)
+ printf("WARNING: Read failed: loc=0\n");
else
if ((i = read(kmem, buf, len)) != len) {
printf("WARNING: Read failed: ");
void
-print_exporter(int kmem, struct afs_exporter *exporter,
+print_exporter(int kmem, struct afs_exporter *exporter,
struct afs_exporter *ptr, int pnt)
{
if (pnt) {
void
-print_nfsclient(int kmem, struct nfsclientpag *ep,
+print_nfsclient(int kmem, struct nfsclientpag *ep,
struct nfsclientpag *ptr, int pnt)
{
char sysname[100];
#endif
void
-print_unixuser(int kmem, struct unixuser *uep,
+print_unixuser(int kmem, struct unixuser *uep,
struct unixuser *ptr, int pnt)
{
Sum_userstp += uep->stLen;
void
-print_server(int kmem, struct server *sep, struct server *ptr, int conns,
+print_server(int kmem, struct server *sep, struct server *ptr, int conns,
int pnt)
{
struct srvAddr sa, *sap = &sa, *sap1;
void
-print_conns(int kmem, struct srvAddr *srv, struct afs_conn *conns, int Con,
+print_conns(int kmem, struct srvAddr *srv, struct afs_conn *conns, int Con,
int pnt)
{
struct afs_conn *cep, ce, *centry = &ce;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
{
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
if (s1.st_size != s2.st_size) {
fprintf(stderr,
"WARNING: New file %s is %u bytes long; should be %u\n",
- file2, (unsigned int) s2.st_size,
+ file2, (unsigned int) s2.st_size,
(unsigned int) s1.st_size);
}
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
if (statemap[inumber] != DSTATE)
errexit("BAD INODE %d TO DESCEND", statemap[inumber]);
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
- * keep any continuation inode information
+ /*
+ * keep any continuation inode information
*/
if (statemap[inumber] & HASCINODE)
statemap[inumber] = HASCINODE | DFOUND;
direrror(inumber, "ZERO LENGTH DIRECTORY");
if (reply("REMOVE") == 1)
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
- * keep any continuation inode information
+ /*
+ * keep any continuation inode information
*/
if (statemap[inumber] & HASCINODE)
statemap[inumber] = HASCINODE | DCLEAR;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Linked list of duplicate blocks.
- *
+ *
* The list is composed of two parts. The first part of the
* list (from duplist through the node pointed to by muldup)
- * contains a single copy of each duplicate block that has been
+ * contains a single copy of each duplicate block that has been
* found. The second part of the list (from muldup to the end)
* contains duplicate blocks that have been found more than once.
* To check if a block has been found as a duplicate it is only
- * necessary to search from duplist through muldup. To find the
+ * necessary to search from duplist through muldup. To find the
* total number of times that a block has been found as a duplicate
* the entire list must be searched for occurences of the block
* in question. The following diagram shows a sample list where
#ifdef VICE
int nViceFiles; /* number of vice files seen */
-#if defined(AFS_SUN_ENV)
+#if defined(AFS_SUN_ENV)
int iscorrupt; /* known to be corrupt/inconsistent */
#endif
#ifdef AFS_SUN_ENV
n_files--;
/*
- * If there is a CI associated with this inode, we must
- * clear it as well.
+ * If there is a CI associated with this inode, we must
+ * clear it as well.
*/
if (statemap[idesc->id_number] & HASCINODE) {
if (!(dp->di_contin < ROOTINO || dp->di_contin > maxino))
#endif /* VICE */
case FSTATE:
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
+ /*
* Keep the continuation inode info
*/
if (statemap[ino] & HASCINODE)
case DSTATE:
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
+ /*
* Keep the continuation inode info
*/
if (statemap[ino] & HASCINODE)
#include "AFS_component_version_number.c"
#ifdef AFS_HPUX_ENV
-int ge_danger = 0; /* on when fsck is not able to fix the dirty file
+int ge_danger = 0; /* on when fsck is not able to fix the dirty file
* system within single run. Problems like dup table
* overflow, maxdup is exceeding MAXDUP.. etc. could
- * potentailly prevent fsck from doing a complete
+ * potentailly prevent fsck from doing a complete
* repair. This is found in a GE hotsite. */
#endif
isconvert = 0;
#endif
#ifdef AFS_HPUX_ENV
- ge_danger = 0; /* set to 1 by any table overflow or more
+ ge_danger = 0; /* set to 1 by any table overflow or more
* dup/bad blocks than expected */
fixed = 1; /* set to 0 by any 'no' reply */
sblock.fs_clean = FS_CLEAN;
/*
* Fix fs_clean if there were no 'no' replies.
- * This is done for both the s300 and s800. The s800 root will be
+ * This is done for both the s300 and s800. The s800 root will be
* guaranteed clean as of 7.0.
*/
if (fixed && (sblock.fs_clean != FS_OK)) {
/*
* We mount the ufs root file system read-only first. After fsck
* runs, we remount the root as read-write. Therefore, we no longer
- * check for different values for fs_state between the root file
+ * check for different values for fs_state between the root file
* system and the rest of file systems.
*/
if (!((sblock.fs_state + (time_t) sblock.fs_time == FSOKAY)
/*
* We mount the ufs root file system read-only first. After fsck
* runs, we remount the root as read-write. Therefore, we no longer
- * check for different values for fs_state between the root file
+ * check for different values for fs_state between the root file
* system and the rest of file systems.
*/
if (!((sblock.fs_clean == FS_CLEAN || sblock.fs_clean == FS_OK))) {
}
#endif
-/* Convert a raw device name into a block device name.
+/* Convert a raw device name into a block device name.
* If the block device is not found, return the raw device name.
- * For HP and SUN, the returned value is not changed. For other
+ * For HP and SUN, the returned value is not changed. For other
* platforms it is changed (I see no rhyme or reason -jpm).
*/
char *
return (rawdev);
}
-/* Convert a block device name into a raw device name.
+/* Convert a block device name into a raw device name.
* If the block device is not found, return null
*/
char *
}
lastino = inumber;
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
- * Don't check blocks and sizes of
- * continuation inodes
+ /*
+ * Don't check blocks and sizes of
+ * continuation inodes
*/
if (CONT) {
statemap[inumber] = CSTATE;
#endif /* AFS_OSF_ENV */
for (j = ndb; j < NDADDR; j++) {
#if defined(AFS_HPUX_ENV) && (defined(DUX) || defined(CNODE_DEV))
- /*
+ /*
* DUX uses db[2] on cnode-specific
- * device files, so skip 'em
+ * device files, so skip 'em
*/
if (j == 2 && SPECIAL)
continue;
(dp->di_mode & IFMT) == IFDIR ? DSTATE : FSTATE;
#endif /* VICE */
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
- * keep track of associated contin inodes
+ /*
+ * keep track of associated contin inodes
*/
if (dp->di_contin != 0)
statemap[inumber] |= HASCINODE;
int holdstate;
#endif /* ACLS */
- /*
+ /*
* check for "."
*/
if (idesc->id_entryno != 0)
if (dirp->d_ino != 0 && strcmp(dirp->d_name, "..") != 0) {
pfatal("CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS %s\n",
dirp->d_name);
-#if defined(AFS_SUN_ENV)
+#if defined(AFS_SUN_ENV)
iscorrupt = 1;
#endif
} else if (dirp->d_reclen < entrysize) {
pfatal("CANNOT FIX, INSUFFICIENT SPACE TO ADD '.'\n");
-#if defined(AFS_SUN_ENV)
+#if defined(AFS_SUN_ENV)
iscorrupt = 1;
#endif
} else if (dirp->d_reclen < 2 * entrysize) {
if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") != 0) {
pfatal("CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS %s\n",
dirp->d_name);
-#if defined(AFS_SUN_ENV)
+#if defined(AFS_SUN_ENV)
iscorrupt = 1;
#endif
} else if (dirp->d_reclen < entrysize) {
pfatal("CANNOT FIX, INSUFFICIENT SPACE TO ADD '..'\n");
-#if defined(AFS_SUN_ENV)
+#if defined(AFS_SUN_ENV)
iscorrupt = 1;
#endif
} else {
if (statemap[inumber] & HASCINODE) {
if ((dp = ginode(inumber)) == NULL)
break;
- /*
+ /*
* Make sure di_contin is not out of range and then
* check and make sure that the inode #di_contin
* is a continuation inode that has not already been
break;
#if defined(ACLS) && defined(AFS_HPUX_ENV)
- /*
- * UNreferenced continuation inode
+ /*
+ * UNreferenced continuation inode
*/
case CSTATE:
clri(&idesc, "UNREF", 2);
break;
- /*
- * referenced continuation inode
+ /*
+ * referenced continuation inode
*/
case CRSTATE:
if ((dp = ginode(inumber)) == NULL)
/* this is the original from UCB/McKusick, but it is clearly wrong. It is
* rounding the # of fragments to the next 1024 (in our case, with a 1K/8K file system),
* while instead it should be rounding to the next block.
- *
+ *
* In addition, we should be sure that we allocate enough space, but that seems to be
* ensured by the fact that the bitmap is rounded up to the nearest short, and that there
* are never more than 16 frags per block.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* The size of a cylinder group is calculated by CGSIZE. The maximum size
* is limited by the fact that cylinder groups are at most one block.
- * Its size is derived from the size of the maps maintained in the
+ * Its size is derived from the size of the maps maintained in the
* cylinder group and the (struct cg) size.
*/
#define CGSIZE(fs) \
* The rules are:
* 1) if nflag is set, it's pretty safe to fsck the target dev
* 2) if the target device is a swap, exit
- * 3) if hotroot is set, and "-F" is not specified prompt the
+ * 3) if hotroot is set, and "-F" is not specified prompt the
* user and wait for reply
* 4) if the target is a mounted file system, and "-F" is not
* specified, prompt the user and wait for reply
#if defined(AFS_HPUX110_ENV)
/*
- * Refer to function compare_sblocks() in HP's fsck.c
+ * Refer to function compare_sblocks() in HP's fsck.c
*
* DESCRIPTION:
* This routine will compare the primary superblock (PRIM_SBLOCK) to the
extern u_char *fragtbl[];
/*
- * Update the frsum fields to reflect addition or deletion
+ * Update the frsum fields to reflect addition or deletion
* of some frags.
*/
fragacct(fs, fragmap, fraglist, cnt)
/*
* Given a block map bit pattern, the frag tables tell whether a
- * particular size fragment is available.
+ * particular size fragment is available.
*
* used as:
* if ((1 << (size - 1)) & fragtbl[fs->fs_frag][map] {
printf("\n");
if (!persevere && (nflag || fswritefd < 0)) {
printf("%s? no\n\n", question);
-#if defined(AFS_SUN_ENV)
+#if defined(AFS_SUN_ENV)
iscorrupt = 1; /* known to be corrupt */
#endif
return (0);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-/* I don't really need all thes, but I can't tell which ones I need
+/* I don't really need all thes, but I can't tell which ones I need
* and which I don't.
*/
#include <afsconfig.h>
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* */
/* ********************************************************************** */
-/*
- * in Check_PermissionRights, certain privileges are afforded to the owner
- * of the volume, or the owner of a file. Are these considered "use of
- * privilege"?
+/*
+ * in Check_PermissionRights, certain privileges are afforded to the owner
+ * of the volume, or the owner of a file. Are these considered "use of
+ * privilege"?
*/
#include <afsconfig.h>
if (BreakDelayedCallBacks_r(thost)) {
ViceLog(0,
("BreakDelayedCallbacks FAILED for host %s:%d which IS UP. Connection from %s:%d. Possible network or routing failure.\n",
- afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port), afs_inet_ntoa_r(rxr_HostOf(*tconn), hoststr2),
+ afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port), afs_inet_ntoa_r(rxr_HostOf(*tconn), hoststr2),
ntohs(rxr_PortOf(*tconn))));
if (MultiProbeAlternateAddress_r(thost)) {
ViceLog(0,
if (BreakDelayedCallBacks_r(thost)) {
ViceLog(0,
("BreakDelayedCallbacks FAILED AGAIN for host %s:%d which IS UP. Connection from %s:%d. Possible network or routing failure.\n",
- afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port), afs_inet_ntoa_r(rxr_HostOf(*tconn), hoststr2),
+ afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port), afs_inet_ntoa_r(rxr_HostOf(*tconn), hoststr2),
ntohs(rxr_PortOf(*tconn))));
code = -1;
}
H_LOCK;
tclient = h_FindClient_r(aconn);
- if (!tclient)
+ if (!tclient)
goto busyout;
thost = tclient->host;
if (thost->hostFlags & HERRORTRANS)
extern int VInit;
while (1) {
- int restarting =
+ int restarting =
#ifdef AFS_DEMAND_ATTACH_FS
VSALVAGE
#else
if ((errorCode == VOFFLINE) && (VInit < 2)) {
/* The volume we want may not be attached yet because
* the volume initialization is not yet complete.
- * We can do several things:
+ * We can do several things:
* 1. return -1, which will cause users to see
* "connection timed out". This is more or
* less the same as always, except that the servers
* may appear to bounce up and down while they
* are actually restarting.
- * 2. return VBUSY which will cause clients to
+ * 2. return VBUSY which will cause clients to
* sleep and retry for 6.5 - 15 minutes, depending
* on what version of the CM they are running. If
- * the file server takes longer than that interval
+ * the file server takes longer than that interval
* to attach the desired volume, then the application
- * will see an ENODEV or EIO. This approach has
+ * will see an ENODEV or EIO. This approach has
* the advantage that volumes which have been attached
* are immediately available, it keeps the server's
* immediate backlog low, and the call is interruptible
* by the user. Users see "waiting for busy volume."
* 3. sleep here and retry. Some people like this approach
- * because there is no danger of seeing errors. However,
- * this approach only works with a bounded number of
+ * because there is no danger of seeing errors. However,
+ * this approach only works with a bounded number of
* clients, since the pending queues will grow without
* stopping. It might be better to find a way to take
* this call and stick it back on a queue in order to
- * recycle this thread for a different request.
+ * recycle this thread for a different request.
* 4. Return a new error code, which new cache managers will
* know enough to interpret as "sleep and retry", without
* the upper bound of 6-15 minutes that is imposed by the
* VBUSY handling. Users will see "waiting for
* busy volume," so they know that something is
- * happening. Old cache managers must be able to do
+ * happening. Old cache managers must be able to do
* something reasonable with this, for instance, mark the
* server down. Fortunately, any error code < 0
* will elicit that behavior. See #1.
}
}
}
- /* allow read operations on busy volume.
+ /* allow read operations on busy volume.
* must check local_errorCode because demand attach fs
* can have local_errorCode == VSALVAGING, errorCode == VBUSY */
else if (local_errorCode == VBUSY && lock == READ_LOCK) {
/* Must not be called with H_LOCK held */
static void
-client_CheckRights(struct client *client, struct acl_accessList *ACL,
+client_CheckRights(struct client *client, struct acl_accessList *ACL,
afs_int32 *rights)
{
*rights = 0;
afs_int32 code = 0;
ObtainReadLock(&client->lock);
- if (client->CPS.prlist_len > 0 && !client->deleted &&
+ if (client->CPS.prlist_len > 0 && !client->deleted &&
client->host && !(client->host->hostFlags & HOSTDELETED))
code = acl_IsAMember(id, &client->CPS);
ReleaseReadLock(&client->lock);
char hoststr[16];
ViceLog(5,
("CheckRights: len=%u, for host=%s:%d\n",
- client->host->hcps.prlist_len,
+ client->host->hcps.prlist_len,
afs_inet_ntoa_r(client->host->host, hoststr),
ntohs(client->host->port)));
} else
if (owner >= 0)
return (client->ViceId == owner);
else {
- /*
+ /*
* We don't have to check for host's cps since only regular
* viceid are volume owners.
*/
* StoreStatus) related calls
*/
/* this code should probably just set a "priv" flag where all the audit events
- * are now, and only generate the audit event once at the end of the routine,
+ * are now, and only generate the audit event once at the end of the routine,
* thus only generating the event if all the checks succeed, but only because
* of the privilege XXX
*/
DFlush(); /* just in case? */
VN_GET_LEN(size, targetptr);
- if (size > off)
+ if (size > off)
size -= off;
- else
+ else
size = 0;
if (size > len)
size = len;
ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
volptr->hashid));
return EIO;
- }
+ }
targFdP = IH_OPEN(targetptr->handle);
if (targFdP == NULL) {
rc = errno;
parentptr->disk.dataVersion++;
newlength = (afs_fsize_t) Length(dir);
- /*
+ /*
* This is a called on both dir removals (i.e. remove, removedir, rename) but also in dir additions
* (create, symlink, link, makedir) so we need to check if we have enough space
* XXX But we still don't check the error since we're dealing with dirs here and really the increase
0;
Time += AFS_LOCKWAIT;
if (LockingType == LockRead) {
- if ( !(rights & PRSFS_LOCK) &&
+ if ( !(rights & PRSFS_LOCK) &&
!(rights & PRSFS_WRITE) &&
!(OWNSp(client, targetptr) && (rights & PRSFS_INSERT)) )
return(EACCES);
} else
return (EAGAIN);
} else if (LockingType == LockWrite) {
- if ( !(rights & PRSFS_WRITE) &&
+ if ( !(rights & PRSFS_WRITE) &&
!(OWNSp(client, targetptr) && (rights & PRSFS_INSERT)) )
return(EACCES);
default:
code = EINVAL;
}
- ViceLog(1,("FsCmd: cmd = %d, code=%d\n",
+ ViceLog(1,("FsCmd: cmd = %d, code=%d\n",
Inputs->command, Outputs->code));
return code;
}
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, FetchDataEvent, errorCode,
+ osi_auditU(acall, FetchDataEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_END);
return (errorCode);
afs_int32 Len, struct AFSFetchStatus * OutStatus,
struct AFSCallBack * CallBack, struct AFSVolSync * Sync)
{
- return common_FetchData64(acall, Fid, Pos, Len, OutStatus, CallBack,
+ return common_FetchData64(acall, Fid, Pos, Len, OutStatus, CallBack,
Sync, 0);
}
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, FetchACLEvent, errorCode,
+ osi_auditU(acall, FetchACLEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
- AUD_FID, Fid,
+ AUD_FID, Fid,
AUD_ACL, AccessList->AFSOpaque_val, AUD_END);
return errorCode;
} /*SRXAFS_FetchACL */
Audit_and_Return:
ViceLog(2, ("SAFS_BulkStatus returns %d\n", errorCode));
- osi_auditU(acall, BulkFetchStatusEvent, errorCode,
+ osi_auditU(acall, BulkFetchStatusEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FIDS, Fids, AUD_END);
return errorCode;
&rights, &anyrights))) {
tstatus = &OutStats->AFSBulkStats_val[i];
tstatus->errorCode = errorCode;
- PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
+ PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
volptr, &client);
parentwhentargetnotdir = (Vnode *) 0;
targetptr = (Vnode *) 0;
Audit_and_Return:
ViceLog(2, ("SAFS_InlineBulkStatus returns %d\n", errorCode));
- osi_auditU(acall, InlineBulkFetchStatusEvent, errorCode,
+ osi_auditU(acall, InlineBulkFetchStatusEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FIDS, Fids, AUD_END);
return 0;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, FetchStatusEvent, code,
+ osi_auditU(acall, FetchStatusEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_END);
return code;
FS_UNLOCK;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, StoreDataEvent, errorCode,
+ osi_auditU(acall, StoreDataEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_END);
return (errorCode);
afs_uint32 Length, afs_uint32 FileLength,
struct AFSFetchStatus * OutStatus, struct AFSVolSync * Sync)
{
- if (FileLength > 0x7fffffff || Pos > 0x7fffffff ||
+ if (FileLength > 0x7fffffff || Pos > 0x7fffffff ||
(0x7fffffff - Pos) < Length)
return EFBIG;
Bad_StoreACL:
/* Update and store volume/vnode and parent vnodes back */
- PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
+ PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
volptr, &client);
ViceLog(2, ("SAFS_StoreACL returns %d\n", errorCode));
errorCode = CallPostamble(tcon, errorCode, thost);
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, StoreACLEvent, errorCode,
+ osi_auditU(acall, StoreACLEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_ACL, AccessList->AFSOpaque_val, AUD_END);
return errorCode;
Bad_StoreStatus:
/* Update and store volume/vnode and parent vnodes back */
- PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
+ PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
volptr, &client);
ViceLog(2, ("SAFS_StoreStatus returns %d\n", errorCode));
return errorCode;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, StoreStatusEvent, code,
+ osi_auditU(acall, StoreStatusEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_END);
return code;
Bad_RemoveFile:
/* Update and store volume/vnode and parent vnodes back */
- PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
+ PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
volptr, &client);
FidZap(&dir);
ViceLog(2, ("SAFS_RemoveFile returns %d\n", errorCode));
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, RemoveFileEvent, code,
+ osi_auditU(acall, RemoveFileEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, DirFid, AUD_STR, Name, AUD_END);
return code;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, CreateFileEvent, code,
+ osi_auditU(acall, CreateFileEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, DirFid, AUD_STR, Name, AUD_FID, OutFid, AUD_END);
return code;
/* The CopyOnWrite might return ENOSPC ( disk full). Even if the second
* call to CopyOnWrite returns error, it is not necessary to revert back
- * the effects of the first call because the contents of the volume is
+ * the effects of the first call because the contents of the volume is
* not modified, it is only replicated.
*/
if (oldvptr->disk.cloned) {
VPutVnode(&fileCode, newfileptr);
assert(fileCode == 0);
}
- (void)PutVolumePackage(fileptr, (newvptr && newvptr != oldvptr ?
+ (void)PutVolumePackage(fileptr, (newvptr && newvptr != oldvptr ?
newvptr : 0), oldvptr, volptr, &client);
FidZap(&olddir);
FidZap(&newdir);
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, RenameFileEvent, code,
+ osi_auditU(acall, RenameFileEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
- AUD_FID, OldDirFid, AUD_STR, OldName,
+ AUD_FID, OldDirFid, AUD_STR, OldName,
AUD_FID, NewDirFid, AUD_STR, NewName, AUD_END);
return code;
ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
volptr->hashid));
return EIO;
- }
+ }
len = strlen((char *) LinkContents);
code = (len == FDH_WRITE(fdP, (char *) LinkContents, len)) ? 0 : VDISKFULL;
- if (code)
+ if (code)
ViceLog(0, ("SAFSS_Symlink FDH_WRITE failed for len=%d, Fid=%u.%d.%d\n", (int)len, OutFid->Volume, OutFid->Vnode, OutFid->Unique));
FDH_CLOSE(fdP);
/*
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, SymlinkEvent, code,
- AUD_ID, t_client ? t_client->ViceId : 0,
+ osi_auditU(acall, SymlinkEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, DirFid, AUD_STR, Name,
AUD_FID, OutFid, AUD_STR, LinkContents, AUD_END);
return code;
/* break call back on DirFid */
BreakCallBack(client->host, DirFid, 0);
/*
- * We also need to break the callback for the file that is hard-linked since part
+ * We also need to break the callback for the file that is hard-linked since part
* of its status (like linkcount) is changed
*/
BreakCallBack(client->host, ExistingFid, 0);
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, LinkEvent, code,
+ osi_auditU(acall, LinkEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, DirFid, AUD_STR, Name,
AUD_FID, ExistingFid, AUD_END);
* requires w access for the user to create a directory. this
* closes a loophole in the current security arrangement, since a
* user with i access only can create a directory and get the
- * implcit a access that goes with dir ownership, and proceed to
+ * implcit a access that goes with dir ownership, and proceed to
* subvert quota in the volume.
*/
if ((errorCode = CheckWriteMode(parentptr, rights, PRSFS_INSERT))
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, MakeDirEvent, code,
+ osi_auditU(acall, MakeDirEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, DirFid, AUD_STR, Name,
AUD_FID, OutFid, AUD_END);
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, RemoveDirEvent, code,
+ osi_auditU(acall, RemoveDirEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, DirFid, AUD_STR, Name, AUD_END);
return code;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, SetLockEvent, code,
- AUD_ID, t_client ? t_client->ViceId : 0,
+ osi_auditU(acall, SetLockEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_LONG, type, AUD_END);
return code;
} /*SRXAFS_SetLock */
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, ExtendLockEvent, code,
+ osi_auditU(acall, ExtendLockEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_END);
return code;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, ReleaseLockEvent, code,
- AUD_ID, t_client ? t_client->ViceId : 0,
+ osi_auditU(acall, ReleaseLockEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
AUD_FID, Fid, AUD_END);
return code;
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, GetStatisticsEvent, code,
+ osi_auditU(acall, GetStatisticsEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0, AUD_END);
return code;
} /*SRXAFS_GetStatistics */
goto Bad_GetStatistics64;
ViceLog(1, ("SAFS_GetStatistics64 Received\n"));
- Statistics->ViceStatistics64_val =
+ Statistics->ViceStatistics64_val =
malloc(statsVersion*sizeof(afs_int64));
Statistics->ViceStatistics64_len = statsVersion;
FS_LOCK;
Statistics->ViceStatistics64_val[STATS64_STARTTIME] = StartTime;
Statistics->ViceStatistics64_val[STATS64_CURRENTCONNECTIONS] =
CurrentConnections;
- Statistics->ViceStatistics64_val[STATS64_TOTALVICECALLS] =
+ Statistics->ViceStatistics64_val[STATS64_TOTALVICECALLS] =
AFSCallStats.TotalCalls;
Statistics->ViceStatistics64_val[STATS64_TOTALFETCHES] =
AFSCallStats.FetchData + AFSCallStats.FetchACL +
AFSCallStats.FetchStatus;
- Statistics->ViceStatistics64_val[STATS64_FETCHDATAS] =
+ Statistics->ViceStatistics64_val[STATS64_FETCHDATAS] =
AFSCallStats.FetchData;
- Statistics->ViceStatistics64_val[STATS64_FETCHEDBYTES] =
+ Statistics->ViceStatistics64_val[STATS64_FETCHEDBYTES] =
AFSCallStats.TotalFetchedBytes;
seconds = AFSCallStats.AccumFetchTime / 1000;
if (seconds <= 0)
seconds = 1;
- Statistics->ViceStatistics64_val[STATS64_FETCHDATARATE] =
+ Statistics->ViceStatistics64_val[STATS64_FETCHDATARATE] =
AFSCallStats.TotalFetchedBytes / seconds;
Statistics->ViceStatistics64_val[STATS64_TOTALSTORES] =
AFSCallStats.StoreData + AFSCallStats.StoreACL +
AFSCallStats.StoreStatus;
- Statistics->ViceStatistics64_val[STATS64_STOREDATAS] =
+ Statistics->ViceStatistics64_val[STATS64_STOREDATAS] =
AFSCallStats.StoreData;
- Statistics->ViceStatistics64_val[STATS64_STOREDBYTES] =
+ Statistics->ViceStatistics64_val[STATS64_STOREDBYTES] =
AFSCallStats.TotalStoredBytes;
seconds = AFSCallStats.AccumStoreTime / 1000;
if (seconds <= 0)
seconds = 1;
- Statistics->ViceStatistics64_val[STATS64_STOREDATARATE] =
+ Statistics->ViceStatistics64_val[STATS64_STOREDATARATE] =
AFSCallStats.TotalStoredBytes / seconds;
#ifdef AFS_NT40_ENV
Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] = -1;
#else
- Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] =
+ Statistics->ViceStatistics64_val[STATS64_PROCESSSIZE] =
(afs_int32) ((long)sbrk(0) >> 10);
#endif
FS_UNLOCK;
h_GetWorkStats((int *)&(Statistics->ViceStatistics64_val[STATS64_WORKSTATIONS]),
- (int *)&(Statistics->ViceStatistics64_val[STATS64_ACTIVEWORKSTATIONS]),
+ (int *)&(Statistics->ViceStatistics64_val[STATS64_ACTIVEWORKSTATIONS]),
(int *)0,
(afs_int32) (FT_ApproxTime()) - (15 * 60));
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, GetStatisticsEvent, code,
+ osi_auditU(acall, GetStatisticsEvent, code,
AUD_ID, t_client ? t_client->ViceId : 0, AUD_END);
return code;
} /*SRXAFS_GetStatistics */
FS_UNLOCK;
#endif /* FS_STATS_DETAILED */
- osi_auditU(a_call, XStatsVersionEvent, 0,
+ osi_auditU(a_call, XStatsVersionEvent, 0,
AUD_ID, t_client ? t_client->ViceId : 0, AUD_END);
return (0);
} /*SRXAFS_XStatsVersion */
/*
- * Dummy routine. Should never be called (the cache manager should only
+ * Dummy routine. Should never be called (the cache manager should only
* invoke this interface when communicating with a AFS/DFS Protocol
* Translator).
*/
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, GetVolumeStatusEvent, errorCode,
+ osi_auditU(acall, GetVolumeStatusEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_LONG, avolid, AUD_STR, *Name, AUD_END);
return (errorCode);
RXUpdate_VolumeStatus(volptr, StoreVolStatus, Name, OfflineMsg, Motd);
Bad_SetVolumeStatus:
- PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
+ PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
volptr, &client);
ViceLog(2, ("SAFS_SetVolumeStatus returns %d\n", errorCode));
errorCode = CallPostamble(tcon, errorCode, thost);
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, SetVolumeStatusEvent, errorCode,
+ osi_auditU(acall, SetVolumeStatusEvent, errorCode,
AUD_ID, t_client ? t_client->ViceId : 0,
AUD_LONG, avolid, AUD_STR, Name, AUD_END);
return (errorCode);
sys2et[EIO] = UAEIO;
}
-/* NOTE: 2006-03-01
- * SRXAFS_CallBackRxConnAddr should be re-written as follows:
- * - pass back the connection, client, and host from CallPreamble
- * - keep a ref on the client, which we don't now
- * - keep a hold on the host, which we already do
- * - pass the connection, client, and host down into SAFSS_*, and use
- * them instead of independently discovering them via rx_ConnectionOf
- * (safe) and rx_GetSpecific (not so safe)
+/* NOTE: 2006-03-01
+ * SRXAFS_CallBackRxConnAddr should be re-written as follows:
+ * - pass back the connection, client, and host from CallPreamble
+ * - keep a ref on the client, which we don't now
+ * - keep a hold on the host, which we already do
+ * - pass the connection, client, and host down into SAFSS_*, and use
+ * them instead of independently discovering them via rx_ConnectionOf
+ * (safe) and rx_GetSpecific (not so safe)
* The idea being that we decide what client and host we're going to use
* when CallPreamble is called, and stay consistent throughout the call.
- * This change is too invasive for 1.4.1 but should be made in 1.5.x.
- */
+ * This change is too invasive for 1.4.1 but should be made in 1.5.x.
+ */
afs_int32
SRXAFS_CallBackRxConnAddr (struct rx_call * acall, afs_int32 *addr)
int i,j;
struct rx_connection *conn;
#endif
-
+
if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &tcallhost)))
goto Bad_CallBackRxConnAddr1;
-
+
#ifndef __EXPERIMENTAL_CALLBACK_CONN_MOVING
errorCode = 1;
#else
goto Bad_CallBackRxConnAddr;
}
thost = tclient->host;
-
+
/* nothing more can be done */
- if ( !thost->interface )
+ if ( !thost->interface )
goto Bad_CallBackRxConnAddr;
-
+
/* the only address is the primary interface */
/* can't change when there's only 1 address, anyway */
- if ( thost->interface->numberOfInterfaces <= 1 )
+ if ( thost->interface->numberOfInterfaces <= 1 )
goto Bad_CallBackRxConnAddr;
-
+
/* initialise a security object only once */
if ( !sc )
sc = (struct rx_securityClass *) rxnull_NewClientSecurityObject();
-
+
for ( i=0; i < thost->interface->numberOfInterfaces; i++)
{
if ( *addr == thost->interface->addr[i] ) {
break;
}
}
-
- if ( *addr != thost->interface->addr[i] )
+
+ if ( *addr != thost->interface->addr[i] )
goto Bad_CallBackRxConnAddr;
conn = rx_NewConnection (thost->interface->addr[i],
thost->port, 1, sc, 0);
- rx_SetConnDeadTime(conn, 2);
- rx_SetConnHardDeadTime(conn, AFS_HARDDEADTIME);
+ rx_SetConnDeadTime(conn, 2);
+ rx_SetConnHardDeadTime(conn, AFS_HARDDEADTIME);
H_UNLOCK;
errorCode = RXAFSCB_Probe(conn);
H_LOCK;
return errorCode;
} else {
rx_DestroyConnection(conn);
- }
+ }
Bad_CallBackRxConnAddr:
h_ReleaseClient_r(tclient);
/* The hold on thost will be released by CallPostamble */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* NEW callback package callback.c (replaces vicecb.c)
* Updated call back routines, NOW with:
- *
+ *
* Faster DeleteVenus (Now called DeleteAllCallBacks)
* Call back breaking for volumes
* Adaptive timeouts on call backs
* nblocks must be < 65536
* Space used is nblocks*16 bytes
* Note that space will be reclaimed by breaking callbacks of old hosts
- *
+ *
* time = AddCallBack(host, fid)
* Add a call back.
* Returns the expiration time at the workstation.
- *
+ *
* BreakCallBack(host, fid)
* Break all call backs for fid, except for the specified host.
* Delete all of them.
- *
+ *
* BreakVolumeCallBacksLater(volume)
* Break all call backs on volume, using single call to each host
* Delete all the call backs.
- *
+ *
* DeleteCallBack(host,fid)
* Delete (do not break) single call back for fid.
- *
+ *
* DeleteFileCallBacks(fid)
* Delete (do not break) all call backs for fid.
*
* DeleteAllCallBacks(host)
* Delete (do not break) all call backs for host.
- *
+ *
* CleanupTimedOutCallBacks()
* Delete all timed out call back entries
* Must be called periodically by file server.
- *
+ *
* BreakDelayedCallBacks(host)
* Break all delayed call backs for host.
* Returns 1: one or more failed, 0: success.
- *
+ *
* PrintCallBackStats()
* Print statistics about call backs to stdout.
- *
+ *
* DumpCallBacks() ---wishful thinking---
* Dump call back state to /tmp/callback.state.
* This is separately interpretable by the program pcb.
return code;
}
-/* the locked flag tells us if the host entry has already been locked
+/* the locked flag tells us if the host entry has already been locked
* by our parent. I don't think anybody actually calls us with the
* host locked, but here's how to make that work: GetSomeSpace has to
* change so that it doesn't attempt to lock any hosts < "host". That
host->Console |= 2;
/* allocate these guys first, since we can't call the allocator with
- * the host structure locked -- or we might deadlock. However, we have
+ * the host structure locked -- or we might deadlock. However, we have
* to avoid races with FindFE... */
while (!(newcb = GetCB())) {
GetSomeSpace_r(host, locked);
return ((cba1->hp)->index - (cba2->hp)->index);
}
-/* Take an array full of hosts, all held. Break callbacks to them, and
- * release the holds once you're done, except don't release xhost. xhost
+/* Take an array full of hosts, all held. Break callbacks to them, and
+ * release the holds once you're done, except don't release xhost. xhost
* may be NULL. Currently only works for a single Fid in afidp array.
* If you want to make this work with multiple fids, you need to fix
* the error handling. One approach would be to force a reset if a
* multi-fid call fails, or you could add delayed callbacks for each
* fid. You probably also need to sort and remove duplicate hosts.
- * When this is called from the BreakVolumeCallBacks path, it does NOT
- * force a reset if the RPC fails, it just marks the host down and tries
+ * When this is called from the BreakVolumeCallBacks path, it does NOT
+ * force a reset if the RPC fails, it just marks the host down and tries
* to create a delayed callback. */
/* N.B. be sure that code works when ncbas == 0 */
/* N.B. requires all the cba[*].hp pointers to be valid... */
-/* This routine does not hold a lock on the host for the duration of
+/* This routine does not hold a lock on the host for the duration of
* the BreakCallBack RPC, which is a significant deviation from tradition.
* It _does_ get a lock on the host before setting VenusDown = 1,
* which is sufficient only if VenusDown = 0 only happens when the
("BCB: INTERNAL ERROR: hp=%p, cba=%p, thead=%u\n",
hp, cba, idx));
} else {
- /*
+ /*
** try breaking callbacks on alternate interface addresses
*/
if (MultiBreakCallBackAlternateAddress(hp, afidp)) {
}
H_LOCK;
- h_Lock_r(hp);
+ h_Lock_r(hp);
if (!(hp->hostFlags & HOSTDELETED)) {
hp->hostFlags |= VENUSDOWN;
/**
AddCallBack1_r(hp, afidp->AFSCBFids_val, itot(idx),
CB_DELAYED, 1);
}
- h_Unlock_r(hp);
+ h_Unlock_r(hp);
H_UNLOCK;
}
}
* Break all call backs for fid, except for the specified host (unless flag
* is true, in which case all get a callback message. Assumption: the specified
* host is h_Held, by the caller; the others aren't.
- * Specified host may be bogus, that's ok. This used to check to see if the
- * host was down in two places, once right after the host was h_held, and
+ * Specified host may be bogus, that's ok. This used to check to see if the
+ * host was down in two places, once right after the host was h_held, and
* again after it was locked. That race condition is incredibly rare and
- * relatively harmless even when it does occur, so we don't check for it now.
+ * relatively harmless even when it does occur, so we don't check for it now.
*/
/* if flag is true, send a break callback msg to "host", too */
int
}
TDel(cb);
HDel(cb);
- CDel(cb, 1); /* Usually first; so this delete
+ CDel(cb, 1); /* Usually first; so this delete
* is reasonably inexpensive */
}
}
host, afs_inet_ntoa_r(host->host, hoststr),
ntohs(host->port)));
}
- DeleteAllCallBacks_r(host, deletefe); /* Delete all callback state
- * rather than attempting to
+ DeleteAllCallBacks_r(host, deletefe); /* Delete all callback state
+ * rather than attempting to
* selectively remember to
* delete the volume callbacks
* later */
* host may be held by some other thread */
#define OTHER_MUSTHOLD_LIH 2
-/* This version does not allow 'host' to be selected unless its ActiveCall
+/* This version does not allow 'host' to be selected unless its ActiveCall
* is newer than 'params->lastlih' which is the host with the oldest
* ActiveCall from the last pass (if it is provided). We filter out any hosts
* that are are held by other threads.
/* first pass: sequentially find the oldest host which isn't held by
anyone for which we can clear callbacks;
skipping 'hostp' */
-/* second pass: sequentially find the oldest host regardless of
+/* second pass: sequentially find the oldest host regardless of
whether or not the host is held; skipping 'hostp' */
/* third pass: attempt to clear callbacks from 'hostp' */
/* always called with hostp unlocked */
-/* Note: hostlist is ordered most recently created host first and
+/* Note: hostlist is ordered most recently created host first and
* its order has no relationship to the most recently used. */
extern struct host *hostList;
static int
static int cb_stateRestoreFEHash(struct fs_dump_state * state);
static int cb_stateRestoreFEs(struct fs_dump_state * state);
static int cb_stateRestoreFE(struct fs_dump_state * state);
-static int cb_stateRestoreCBs(struct fs_dump_state * state, struct FileEntry * fe,
+static int cb_stateRestoreCBs(struct fs_dump_state * state, struct FileEntry * fe,
struct iovec * iov, int niovecs);
static int cb_stateVerifyFEHash(struct fs_dump_state * state);
ret = 1;
goto done;
}
-
+
done:
return ret;
}
}
}
}
-
+
/* restore indices in the CallBack structures */
for (i = 1; i < state->cb_map.len; i++) {
if (state->cb_map.entries[i].new_idx) {
ret = 1;
goto done;
}
-
+
/* restore the cb->fhead entry */
if (fe_OldToNew(state, cb->fhead, &cb->fhead)) {
ret = 1;
int ret = 0, len;
if (fs_stateReadHeader(state, &state->cb_hdr->timeout_offset,
- state->cb_timeout_hdr,
+ state->cb_timeout_hdr,
sizeof(struct callback_state_timeout_header))) {
ret = 1;
goto done;
int ret = 0, len;
if (fs_stateReadHeader(state, &state->cb_hdr->fehash_offset,
- state->cb_fehash_hdr,
+ state->cb_fehash_hdr,
sizeof(struct callback_state_fehash_header))) {
ret = 1;
goto done;
iov[1].iov_len = sizeof(struct FEDiskEntry);
iovcnt = 2;
- for (cbi = fe->firstcb, cb = itocb(cbi);
- cb != NULL;
+ for (cbi = fe->firstcb, cb = itocb(cbi);
+ cb != NULL;
cbi = cb->cnext, cb = itocb(cbi), hdr.nCBs++) {
if (cbi > state->cb_hdr->cb_max) {
state->cb_hdr->cb_max = cbi;
}
hdr.magic = CALLBACK_STATE_ENTRY_MAGIC;
- hdr.len = sizeof(hdr) + sizeof(struct FEDiskEntry) +
+ hdr.len = sizeof(hdr) + sizeof(struct FEDiskEntry) +
(hdr.nCBs * sizeof(struct CBDiskEntry));
if (!written) {
}
}
}
-
+
done:
return ret;
}
static int
-cb_stateRestoreCBs(struct fs_dump_state * state, struct FileEntry * fe,
+cb_stateRestoreCBs(struct fs_dump_state * state, struct FileEntry * fe,
struct iovec * iov, int niovecs)
{
int ret = 0, idx;
}
static int
-cb_stateDiskEntryToFE(struct fs_dump_state * state,
+cb_stateDiskEntryToFE(struct fs_dump_state * state,
struct FEDiskEntry * in, struct FileEntry * out)
{
int ret = 0;
struct CallBack *cb;
time_t now;
int timebits = 32;
-
+
memset(&fid, 0, sizeof(fid));
argc--;
argv++;
#ifdef AFS_64BIT_ENV
&& (timebits != 64)
#endif
- )
+ )
err++;
} else if (!strcmp(*argv, "-volume")) {
if (argc < 1) {
interfaces[j] = host->interface->interface[i];
conns[j] =
- rx_NewConnection(interfaces[j].addr,
+ rx_NewConnection(interfaces[j].addr,
interfaces[j].port, 1, sc, 0);
rx_SetConnDeadTime(conns[j], 2);
rx_SetConnHardDeadTime(conns[j], AFS_HARDDEADTIME);
/*
-** try multi_RX probes to host.
+** try multi_RX probes to host.
** return 0 on success, non-0 on failure
*/
int
interfaces[j] = host->interface->interface[i];
conns[j] =
- rx_NewConnection(interfaces[j].addr,
+ rx_NewConnection(interfaces[j].addr,
interfaces[j].port, 1, sc, 0);
rx_SetConnDeadTime(conns[j], 2);
rx_SetConnHardDeadTime(conns[j], AFS_HARDDEADTIME);
("multiprobe failure with addr %s:%d\n",
afs_inet_ntoa_r(interfaces[multi_i].addr, hoststr),
ntohs(interfaces[multi_i].port)));
-
+
/* This is less than desirable but its the best we can do.
- * The AFS Cache Manager will return either 0 for a Uuid
- * match and a 1 for a non-match. If the error is 1 we
- * therefore know that our mapping of IP address to Uuid
+ * The AFS Cache Manager will return either 0 for a Uuid
+ * match and a 1 for a non-match. If the error is 1 we
+ * therefore know that our mapping of IP address to Uuid
* is wrong. We should attempt to find the correct
* Uuid and fix the host tables.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_int32 rx_nBusies; /*Ttl VBUSYs sent to shed load */
afs_int32 fs_nBusies; /*Ttl VBUSYs sent during restart/vol clone */
- /*
+ /*
* Can't count this as an RPC because it breaks the data structure
*/
afs_int32 fs_nGetCaps; /* Number of GetCapabilities calls */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
ViceLog(0, ("hpr_Initialize: Could not open configuration directory: %s", AFSDIR_SERVER_ETC_DIRPATH));
return -1;
}
-
+
code = afsconf_GetLocalCell(tdir, cellstr, sizeof(cellstr));
if (code) {
ViceLog(0, ("hpr_Initialize: Could not get local cell. [%d]", code));
afsconf_Close(tdir);
return code;
}
-
+
code = afsconf_GetCellInfo(tdir, cellstr, "afsprot", &info);
if (code) {
ViceLog(0, ("hpr_Initialize: Could not locate cell %s in %s/%s",
afsconf_Close(tdir);
return code;
}
-
+
code = rx_Init(0);
if (code) {
ViceLog(0, ("hpr_Initialize: Could not initialize rx."));
afsconf_Close(tdir);
return code;
}
-
+
/* Most callers use secLevel==1, however, the fileserver uses secLevel==2
* to force use of the KeyFile. secLevel == 0 implies -noauth was
* specified. */
sc = rxnull_NewClientSecurityObject();
if (scIndex == RX_SECIDX_NULL)
ViceLog(0, ("hpr_Initialize: Could not get afs tokens, running unauthenticated. [%d]", code));
-
+
memset(serverconns, 0, sizeof(serverconns)); /* terminate list!!! */
for (i = 0; i < info.numServers; i++) {
serverconns[i] =
#ifdef AFS_PTHREAD_ENV
afs_int32 code;
afs_int32 over;
- struct ubik_client *uclient =
+ struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
if (!uclient) {
code = hpr_Initialize(&uclient);
- if (!code)
+ if (!code)
assert(pthread_setspecific(viced_uclient_key, (void *)uclient) == 0);
else
return code;
#ifdef AFS_PTHREAD_ENV
afs_int32 code;
afs_int32 i;
- struct ubik_client *uclient =
+ struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
if (!uclient) {
{
#ifdef AFS_PTHREAD_ENV
afs_int32 code;
- struct ubik_client *uclient =
+ struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
-
+
if (!uclient) {
code = hpr_Initialize(&uclient);
if (!code)
#ifdef AFS_PTHREAD_ENV
afs_int32 code;
afs_int32 over;
- struct ubik_client *uclient =
+ struct ubik_client *uclient =
(struct ubik_client *)pthread_getspecific(viced_uclient_key);
if (!uclient) {
* with one of these errors. In such case we would like to reevaluate the rpc call to
* find if there's cps for this guy. We treat other errors (except network failures
* ones - i.e. code < 0) as an indication that there is no CPS for this host. Ideally
- * we could like to deal this problem the other way around (i.e. if code == NOCPS
+ * we could like to deal this problem the other way around (i.e. if code == NOCPS
* ignore else retry next time) but the problem is that there're other errors (i.e.
* EPERM) for which we don't want to retry and we don't know the whole code list!
*/
if (code < 0 || code == UNOQUORUM || code == UNOTSYNC) {
- /*
+ /*
* We would have preferred to use a while loop and try again since ops in protected
* acls for this host will fail now but they'll be reevaluated on any subsequent
* call. The attempt to wait for a quorum/sync site or network error won't work
- * since this problems really should only occurs during a complete fileserver
+ * since this problems really should only occurs during a complete fileserver
* restart. Since the fileserver will start before the ptservers (and thus before
* quorums are complete) clients will be utilizing all the fileserver's lwps!!
*/
assert(host);
if (!(host->hostFlags & HOSTDELETED) && chain->addr == haddr
&& chain->port == hport) {
- if ((host->hostFlags & HWHO_INPROGRESS) &&
+ if ((host->hostFlags & HWHO_INPROGRESS) &&
h_threadquota(host->lock.num_waiting)) {
*hostp = 0;
return VBUSY;
ntohs(host->port), client));
return;
}
-
+
if (client->refCount) {
char hoststr[16];
ViceLog(0,
/* delete the hash entry for each valid alternate addresses */
for (i = 0; i < host->interface->numberOfInterfaces; i++) {
hostAddrPort = host->interface->interface[i];
- /*
+ /*
* if the interface addr/port is the primary, we already
* removed it. If the addr/port is not valid, its not
* in the hash table.
* be held after enumeration.
*/
void
-h_Enumerate_r(int (*proc) (struct host *, int, void *),
+h_Enumerate_r(int (*proc) (struct host *, int, void *),
struct host *enumstart, void *param)
{
struct host *host, *next;
if (!chain->hostPtr)
continue;
- if (chain->hostPtr->interface &&
+ if (chain->hostPtr->interface &&
afs_uuid_equal(&chain->hostPtr->interface->uuid, uuid)) {
if (LogLevel >= 125) {
- afsUUID_to_string(&chain->hostPtr->interface->uuid, uuid1,
+ afsUUID_to_string(&chain->hostPtr->interface->uuid, uuid1,
127);
afsUUID_to_string(uuid, uuid2, 127);
- ViceLog(125, ("h_AddHostToUuidHashTable_r: host %" AFS_PTR_FMT " (uuid %s) exists as %s:%d (uuid %s)\n",
+ ViceLog(125, ("h_AddHostToUuidHashTable_r: host %" AFS_PTR_FMT " (uuid %s) exists as %s:%d (uuid %s)\n",
host, uuid1,
- afs_inet_ntoa_r(chain->hostPtr->host, hoststr),
+ afs_inet_ntoa_r(chain->hostPtr->host, hoststr),
ntohs(chain->hostPtr->port), uuid2));
}
return;
if (LogLevel < 125)
return;
afsUUID_to_string(uuid, uuid2, 127);
- ViceLog(125,
+ ViceLog(125,
("h_AddHostToUuidHashTable_r: host %p (%s:%d) added as uuid %s\n",
- host, afs_inet_ntoa_r(chain->hostPtr->host, hoststr),
+ host, afs_inet_ntoa_r(chain->hostPtr->host, hoststr),
ntohs(chain->hostPtr->port), uuid2));
}
struct h_UuidHashChain **uhp, *uth;
char uuid1[128];
char hoststr[16];
-
+
if (!host->interface)
return 0;
-
+
/* hash into proper bucket */
index = h_UuidHashIndex(&host->interface->uuid);
-
+
if (LogLevel >= 125)
afsUUID_to_string(&host->interface->uuid, uuid1, 127);
for (uhp = &hostUuidHashTable[index]; (uth = *uhp); uhp = &uth->next) {
assert(uth->hostPtr);
if (uth->hostPtr == host) {
- ViceLog(125,
+ ViceLog(125,
("h_DeleteHostFromUuidHashTable_r: host %" AFS_PTR_FMT " (uuid %s %s:%d)\n",
- host, uuid1, afs_inet_ntoa_r(host->host, hoststr),
+ host, uuid1, afs_inet_ntoa_r(host->host, hoststr),
ntohs(host->port)));
*uhp = uth->next;
free(uth);
return 1;
}
}
- ViceLog(125,
+ ViceLog(125,
("h_DeleteHostFromUuidHashTable_r: host %" AFS_PTR_FMT " (uuid %s %s:%d) not found\n",
- host, uuid1, afs_inet_ntoa_r(host->host, hoststr),
+ host, uuid1, afs_inet_ntoa_r(host->host, hoststr),
ntohs(host->port)));
return 0;
}
}
/*
- * This is called with host locked and held.
+ * This is called with host locked and held.
* It is called to either validate or add an additional interface
- * address/port on the specified host.
+ * address/port on the specified host.
*
* All addresses are in network byte order.
*/
int number;
struct Interface *interface;
char hoststr[16], hoststr2[16];
-
+
assert(host);
assert(host->interface);
for (i = 0; i < number; i++) {
if (host->interface->interface[i].addr == addr &&
host->interface->interface[i].port == port) {
- ViceLog(125,
+ ViceLog(125,
("addInterfaceAddr : found host %" AFS_PTR_FMT " (%s:%d) adding %s:%d%s\n",
- host, afs_inet_ntoa_r(host->host, hoststr),
- ntohs(host->port), afs_inet_ntoa_r(addr, hoststr2),
- ntohs(port), host->interface->interface[i].valid ? "" :
+ host, afs_inet_ntoa_r(host->host, hoststr),
+ ntohs(host->port), afs_inet_ntoa_r(addr, hoststr2),
+ ntohs(port), host->interface->interface[i].valid ? "" :
", validating"));
-
+
if (host->interface->interface[i].valid == 0) {
host->interface->interface[i].valid = 1;
h_AddHostToAddrHashTable_r(addr, port, host);
}
}
- ViceLog(125, ("addInterfaceAddr : host %" AFS_PTR_FMT " (%s:%d) adding %s:%d\n",
- host, afs_inet_ntoa_r(host->host, hoststr),
- ntohs(host->port), afs_inet_ntoa_r(addr, hoststr2),
+ ViceLog(125, ("addInterfaceAddr : host %" AFS_PTR_FMT " (%s:%d) adding %s:%d\n",
+ host, afs_inet_ntoa_r(host->host, hoststr),
+ ntohs(host->port), afs_inet_ntoa_r(addr, hoststr2),
ntohs(port)));
-
+
interface = (struct Interface *)
malloc(sizeof(struct Interface) + (sizeof(struct AddrPort) * number));
if (!interface) {
interface->uuid = host->interface->uuid;
for (i = 0; i < number; i++)
interface->interface[i] = host->interface->interface[i];
-
+
/* Add the new valid interface */
interface->interface[number].addr = addr;
interface->interface[number].port = port;
h_AddHostToAddrHashTable_r(addr, port, host);
free(host->interface);
host->interface = interface;
-
+
return 0;
}
assert(host);
assert(host->interface);
- ViceLog(125, ("removeInterfaceAddr : host %" AFS_PTR_FMT " (%s:%d) addr %s:%d\n",
- host, afs_inet_ntoa_r(host->host, hoststr),
- ntohs(host->port), afs_inet_ntoa_r(addr, hoststr2),
+ ViceLog(125, ("removeInterfaceAddr : host %" AFS_PTR_FMT " (%s:%d) addr %s:%d\n",
+ host, afs_inet_ntoa_r(host->host, hoststr),
+ ntohs(host->port), afs_inet_ntoa_r(addr, hoststr2),
ntohs(port)));
/*
interface->numberOfInterfaces = number;
return 0;
}
- }
+ }
/* not found */
return 0;
}
static int
-h_threadquota(int waiting)
+h_threadquota(int waiting)
{
if (lwps > 64) {
if (waiting > 5)
* structure for this address. Verify that the identity
* of the caller matches the identity in the host structure.
*/
- if ((host->hostFlags & HWHO_INPROGRESS) &&
+ if ((host->hostFlags & HWHO_INPROGRESS) &&
h_threadquota(host->lock.num_waiting)) {
h_Release_r(host);
host = NULL;
* If there is a match, we can use the existing callback
* connection to verify the UUID. If they do not match
* we need to use a new callback connection to verify the
- * UUID of the incoming caller and perhaps use the old
+ * UUID of the incoming caller and perhaps use the old
* callback connection to verify that the old address/port
* is still valid.
*/
-
+
cb_conn = host->callback_rxcon;
rx_GetConnection(cb_conn);
H_UNLOCK;
if (haddr == host->host && hport == host->port) {
- /* The existing callback connection matches the
+ /* The existing callback connection matches the
* incoming connection so just use it.
*/
code =
cb_in = rx_NewConnection(haddr, hport, 1, sc, 0);
rx_SetConnDeadTime(cb_in, 50);
rx_SetConnHardDeadTime(cb_in, AFS_HARDDEADTIME);
-
+
code =
RXAFSCB_TellMeAboutYourself(cb_in, &interf, &caps);
if (code == RXGEN_OPCODE)
rx_PutConnection(cb_conn);
cb_conn=NULL;
H_LOCK;
- if ((code == RXGEN_OPCODE) ||
+ if ((code == RXGEN_OPCODE) ||
((code == 0) && (afs_uuid_equal(&interf.uuid, &nulluuid)))) {
identP = (struct Identity *)malloc(sizeof(struct Identity));
if (!identP) {
identP->valid = 0;
rx_SetSpecific(tcon, rxcon_ident_key, identP);
if (cb_in == NULL) {
- /* The host on this connection was unable to respond to
+ /* The host on this connection was unable to respond to
* the WhoAreYou. We will treat this as a new connection
* from the existing host. The worst that can happen is
* that we maintain some extra callback state information */
if (host->interface) {
ViceLog(0,
("Host %" AFS_PTR_FMT " (%s:%d) used to support WhoAreYou, deleting.\n",
- host,
+ host,
afs_inet_ntoa_r(host->host, hoststr),
ntohs(host->port)));
host->hostFlags |= HOSTDELETED;
/* The incoming connection does not support WhoAreYou but
* the original one might have. Use removeAddress_r() to
* remove this addr/port from the host that was found.
- * If there are no more addresses left for the host it
+ * If there are no more addresses left for the host it
* will be deleted. Then we retry.
*/
removeAddress_r(host, haddr, hport);
ViceLog(25,
("Uuid doesn't match host %" AFS_PTR_FMT " (%s:%d).\n",
host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
-
+
removeAddress_r(host, host->host, host->port);
}
host->hostFlags &= ~HWHO_INPROGRESS;
host = NULL;
goto retry;
} else if (cb_in) {
- /* the UUID matched the client at the incoming addr/port
- * but this is not the address of the active callback
+ /* the UUID matched the client at the incoming addr/port
+ * but this is not the address of the active callback
* connection. Try that connection and see if the client
* is still there and if the reported UUID is the same.
*/
if (code2) {
/* The primary address is either not responding or
* is not the client we are looking for. Need to
- * remove the primary address and add swap in the new
+ * remove the primary address and add swap in the new
* callback connection, and destroy the old one.
*/
struct rx_connection *rxconn;
ViceLog(0,("CB: ProbeUuid for host %" AFS_PTR_FMT " (%s:%d) failed %d\n",
- host,
+ host,
afs_inet_ntoa_r(host->host, hoststr),
ntohs(host->port),code2));
- /*
+ /*
* make sure we add and then remove. otherwise, we
- * might end up with no valid interfaces after the
+ * might end up with no valid interfaces after the
* remove and the host will have been marked deleted.
*/
addInterfaceAddr_r(host, haddr, hport);
rxconn = host->callback_rxcon;
host->callback_rxcon = cb_in;
cb_in = NULL;
-
+
if (rxconn) {
/*
* If rx_DestroyConnection calls h_FreeConnection we
}
} else {
if (cb_in) {
- /* A callback to the incoming connection address is failing.
+ /* A callback to the incoming connection address is failing.
* Assume that the addr/port is no longer associated with the host
* returned by h_Lookup_r.
*/
rx_PutConnection(cb_conn);
cb_conn=NULL;
H_LOCK;
- if ((code == RXGEN_OPCODE) ||
+ if ((code == RXGEN_OPCODE) ||
((code == 0) && (afs_uuid_equal(&interf.uuid, &nulluuid)))) {
if (!identP)
identP =
cb_conn=NULL;
if (code2) {
/* The primary address is either not responding or
- * is not the client we are looking for.
+ * is not the client we are looking for.
* MultiProbeAlternateAddress_r() will remove the
* alternate interfaces that do not have the same
* Uuid. */
ViceLog(0,("CB: ProbeUuid for host %" AFS_PTR_FMT " (%s:%d) failed %d\n",
- oldHost,
+ oldHost,
afs_inet_ntoa_r(oldHost->host, hoststr),
ntohs(oldHost->port),code2));
MultiProbeAlternateAddress_r(oldHost);
ViceLog(25,
("CB: Host %" AFS_PTR_FMT " (%s:%d) has new addr %s:%d\n",
- oldHost,
+ oldHost,
afs_inet_ntoa_r(oldHost->host, hoststr2),
ntohs(oldHost->port),
afs_inet_ntoa_r(haddr, hoststr),
ntohs(hport)));
- /*
+ /*
* add then remove. otherwise the host may get marked
* deleted if we removed the only valid address.
*/
addInterfaceAddr_r(oldHost, haddr, hport);
if (probefail || oldHost->host == haddr) {
- /*
- * The probe failed which means that the old
- * address is either unreachable or is not the
- * same host we were just contacted by. We will
- * also remove addresses if only the port has
+ /*
+ * The probe failed which means that the old
+ * address is either unreachable or is not the
+ * same host we were just contacted by. We will
+ * also remove addresses if only the port has
* changed because that indicates the client
- * is behind a NAT.
+ * is behind a NAT.
*/
removeInterfaceAddr_r(oldHost, oldHost->host, oldHost->port);
} else {
for (i = 0; i < number; i++) {
if (interface->interface[i].addr == haddr &&
interface->interface[i].port != hport) {
- /*
+ /*
* We have just been contacted by a client
- * that has been seen from behind a NAT
+ * that has been seen from behind a NAT
* and at least one other address.
*/
- removeInterfaceAddr_r(oldHost, haddr,
+ removeInterfaceAddr_r(oldHost, haddr,
interface->interface[i].port);
break;
}
rxconn = oldHost->callback_rxcon;
oldHost->callback_rxcon = host->callback_rxcon;
host->callback_rxcon = rxconn;
-
+
/* don't destroy rxconn here; let h_TossStuff_r
* take care of that via h_Release_r below */
}
/* This really is a new host */
h_AddHostToUuidHashTable_r(&identP->uuid, host);
cb_conn = host->callback_rxcon;
- rx_GetConnection(cb_conn);
+ rx_GetConnection(cb_conn);
H_UNLOCK;
code =
RXAFSCB_InitCallBackState3(cb_conn,
int created = 0;
client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
- if (client && client->sid == rxr_CidOf(tcon)
+ if (client && client->sid == rxr_CidOf(tcon)
&& client->VenusEpoch == rxr_GetEpoch(tcon)
&& !(client->host->hostFlags & HOSTDELETED)) {
client->refCount++;
h_Hold_r(client->host);
- if (!client->deleted && client->prfail != 2) {
+ if (!client->deleted && client->prfail != 2) {
/* Could add shared lock on client here */
/* note that we don't have to lock entry in this path to
* ensure CPS is initialized, since we don't call rx_SetSpecific
expTime = 0x7fffffff;
} else if (authClass == 2) {
afs_int32 kvno;
-
+
/* kerberos ticket */
code = rxkad_GetServerInfo(tcon, /*level */ 0, (afs_uint32 *)&expTime,
tname, tinst, tcell, &kvno);
if (!client) { /* loop */
host = h_GetHost_r(tcon); /* Returns with incremented refCount */
- if (!host)
+ if (!host)
return NULL;
retryfirstclient:
char hoststr[16];
ViceLog(0,
("pr_GetCPS failed(%d) for user %d, host %" AFS_PTR_FMT " (%s:%d)\n",
- code, viceid, client->host,
+ code, viceid, client->host,
afs_inet_ntoa_r(client->host->host,hoststr),
ntohs(client->host->port)));
}
/* the disabling of system:administrators is so iffy and has so many
* possible failure modes that we will disable it again */
- /* Turn off System:Administrator for safety
+ /* Turn off System:Administrator for safety
* if (AL_IsAMember(SystemId, client->CPS) == 0)
* assert(AL_DisableGroup(SystemId, client->CPS) == 0); */
}
if (created) {
ViceLog(0, ("FindClient: stillborn client %p(%x); "
"conn %p (host %s:%d) had client %p(%x)\n",
- client, client->sid, tcon,
+ client, client->sid, tcon,
afs_inet_ntoa_r(rxr_HostOf(tcon), hoststr),
ntohs(rxr_PortOf(tcon)),
oldClient, oldClient->sid));
if (created) {
FreeCE(client);
created = 0;
- }
+ }
oldClient->refCount++;
H_UNLOCK;
ObtainWriteLock(&oldClient->lock);
} else {
ViceLog(0, ("FindClient: deleted client %p(%x) already had "
"conn %p (host %s:%d), stolen by client %p(%x)\n",
- oldClient, oldClient->sid, tcon,
+ oldClient, oldClient->sid, tcon,
afs_inet_ntoa_r(rxr_HostOf(tcon), hoststr),
ntohs(rxr_PortOf(tcon)),
client, client->sid));
int
PutClient(struct client **cp)
{
- if (*cp == NULL)
+ if (*cp == NULL)
return -1;
H_LOCK;
h_DumpHost(struct host *host, int flags, void *rock)
{
StreamHandle_t *file = (StreamHandle_t *)rock;
-
+
int i;
char tmpStr[256];
char hoststr[16];
if (host->interface)
for (i = 0; i < host->interface->numberOfInterfaces; i++) {
char hoststr[16];
- sprintf(tmpStr, " %s:%d",
+ sprintf(tmpStr, " %s:%d",
afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
ntohs(host->interface->interface[i].port));
(void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
/* demand attach fs
* host state serialization
*
- * this procedure restores all host state from a disk for fast startup
+ * this procedure restores all host state from a disk for fast startup
*/
int
h_stateRestore(struct fs_dump_state * state)
if (h->interface) {
for (i = h->interface->numberOfInterfaces-1; i >= 0; i--) {
- if (h_stateVerifyAddrHash(state, h, h->interface->interface[i].addr,
+ if (h_stateVerifyAddrHash(state, h, h->interface->interface[i].addr,
h->interface->interface[i].port,
h->interface->interface[i].valid)) {
state->bail = 1;
if (host->interface &&
afs_uuid_equal(&host->interface->uuid, uuidp)) {
if (host != h) {
- ViceLog(0, ("h_stateVerifyUuidHash: warning: uuid hash entry points to different host struct (%d, %d)\n",
+ ViceLog(0, ("h_stateVerifyUuidHash: warning: uuid hash entry points to different host struct (%d, %d)\n",
h->index, host->index));
state->flags.warnings_generated = 1;
}
h_hostToDiskEntry_r(host, &hdsk);
if (host->interface) {
- if_len = sizeof(struct Interface) +
+ if_len = sizeof(struct Interface) +
((host->interface->numberOfInterfaces-1) * sizeof(struct AddrPort));
ifp = (struct Interface *) malloc(if_len);
assert(ifp != NULL);
if (hdsk.index > state->h_hdr->index_max)
state->h_hdr->index_max = hdsk.index;
- hdr.len = sizeof(struct host_state_entry_header) +
+ hdr.len = sizeof(struct host_state_entry_header) +
sizeof(struct hostDiskEntry) + if_len + hcps_len;
hdr.magic = HOST_STATE_ENTRY_MAGIC;
iov[0].iov_len = sizeof(hdr);
iov[1].iov_base = (char *) &hdsk;
iov[1].iov_len = sizeof(struct hostDiskEntry);
-
+
if (fs_stateWriteV(state, iov, iovcnt)) {
ViceLog(0, ("h_stateSaveHost: failed to save host %d", host->index));
state->bail = 1;
if (ifp) {
int i;
for (i = ifp->numberOfInterfaces-1; i >= 0; i--) {
- if (ifp->interface[i].valid &&
+ if (ifp->interface[i].valid &&
!(ifp->interface[i].addr == host->host &&
ifp->interface[i].port == host->port)) {
- h_AddHostToAddrHashTable_r(ifp->interface[i].addr,
- ifp->interface[i].port,
+ h_AddHostToAddrHashTable_r(ifp->interface[i].addr,
+ ifp->interface[i].port,
host);
}
}
}
/* Note: it's safe to delete hosts even if they have call
* back state, because break delayed callbacks (called when a
- * message is received from the workstation) will always send a
+ * message is received from the workstation) will always send a
* break all call backs to the workstation if there is no
* callback.
*/
H_LOCK;
if (code) {
ViceLog(0,
- ("CheckHost: Probe failed for host %s:%d, code %d\n",
+ ("CheckHost: Probe failed for host %s:%d, code %d\n",
hoststr, ntohs(host->port), code));
host->hostFlags |= VENUSDOWN;
}
}
/* Note: it's safe to delete hosts even if they have call
* back state, because break delayed callbacks (called when a
- * message is received from the workstation) will always send a
+ * message is received from the workstation) will always send a
* break all call backs to the workstation if there is no
* callback.
*/
H_LOCK;
if (code) {
ViceLog(0,
- ("CheckHost_r: Probe failed for host %s:%d, code %d\n",
+ ("CheckHost_r: Probe failed for host %s:%d, code %d\n",
hoststr, ntohs(host->port), code));
host->hostFlags |= VENUSDOWN;
}
*/
checktime = now - 15 * 60;
clientdeletetime = now - 120 * 60; /* 2 hours ago */
-
+
H_LOCK;
h_Enumerate_r(CheckHost_r, hostList, NULL);
H_UNLOCK;
myPort = host->port; /* current port */
ViceLog(125,
- ("initInterfaceAddr : host %s:%d numAddr %d\n",
+ ("initInterfaceAddr : host %s:%d numAddr %d\n",
afs_inet_ntoa_r(myAddr, hoststr), ntohs(myPort), number));
/* validation checks */
}
/*
- * The client's notion of its own IP addresses is not reliable.
+ * The client's notion of its own IP addresses is not reliable.
*
* 1. The client list might contain private address ranges which
* are likely to be re-used by many clients allocated addresses
/*
* Convert IP addresses to network byte order, and remove
- * duplicate IP addresses from the interface list, and
- * determine whether or not the incoming addr/port is
+ * duplicate IP addresses from the interface list, and
+ * determine whether or not the incoming addr/port is
* listed. Note that if the address matches it is not
* truly a match because the port number for the entries
* in the interface list are port 7001 and the port number
for (i = 0; i < count; i++) {
interface->interface[i].addr = interf->addr_in[i];
- /* We store the port as 7001 because the addresses reported by
+ /* We store the port as 7001 because the addresses reported by
* TellMeAboutYourself and WhoAreYou RPCs are only valid if they
* are coming from fully connected hosts (no NAT/PATs)
*/
interface->interface[i].port = port7001;
- interface->interface[i].valid =
+ interface->interface[i].valid =
(interf->addr_in[i] == myAddr && port7001 == myPort) ? 1 : 0;
}
if (LogLevel >= 125) {
afsUUID_to_string(&interface->uuid, uuidstr, 127);
-
+
ViceLog(125, ("--- uuid %s\n", uuidstr));
for (i = 0; i < host->interface->numberOfInterfaces; i++) {
- ViceLog(125, ("--- alt address %s:%d\n",
+ ViceLog(125, ("--- alt address %s:%d\n",
afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
ntohs(host->interface->interface[i].port)));
}
/* deleted a HashChain structure for this address and host */
/* returns 1 on success */
int
-h_DeleteHostFromAddrHashTable_r(afs_uint32 addr, afs_uint16 port,
+h_DeleteHostFromAddrHashTable_r(afs_uint32 addr, afs_uint16 port,
struct host *host)
{
char hoststr[16];
if (addr == 0 && port == 0)
return 1;
- for (hp = &hostAddrHashTable[h_HashIndex(addr)]; (th = *hp);
+ for (hp = &hostAddrHashTable[h_HashIndex(addr)]; (th = *hp);
hp = &th->next) {
assert(th->hostPtr);
if (th->hostPtr == host && th->addr == addr && th->port == port) {
return 1;
}
}
- ViceLog(125,
+ ViceLog(125,
("h_DeleteHostFromAddrHashTable_r: host %" AFS_PTR_FMT " (%s:%d) not found\n",
- host, afs_inet_ntoa_r(host->host, hoststr),
+ host, afs_inet_ntoa_r(host->host, hoststr),
ntohs(host->port)));
return 0;
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
char hcpsfailed; /* Retry the cps call next time */
prlist hcps; /* cps for hostip acls */
afs_uint32 LastCall; /* time of last call from host */
- afs_uint32 ActiveCall; /* time of any call but gettime,
+ afs_uint32 ActiveCall; /* time of any call but gettime,
getstats and getcaps */
struct client *FirstClient; /* first connection from host */
afs_uint32 cpsCall; /* time of last cps call from this host */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif /* AFS_PTHREAD_ENV */
#ifdef AFS_NT40_ENV
-#define NT_OPEN_MAX 1024 /* This is an arbitrary no. we came up with for
+#define NT_OPEN_MAX 1024 /* This is an arbitrary no. we came up with for
* now. We hope this will be replaced by a more
* intelligent estimate later. */
#endif
int printBanner = 0;
int rxJumbograms = 0; /* default is to not send and receive jumbograms. */
int rxBind = 0; /* don't bind */
-int rxkadDisableDotCheck = 0; /* disable check for dot in principal name */
+int rxkadDisableDotCheck = 0; /* disable check for dot in principal name */
int rxMaxMTU = -1;
-afs_int32 implicitAdminRights = PRSFS_LOOKUP; /* The ADMINISTER right is
+afs_int32 implicitAdminRights = PRSFS_LOOKUP; /* The ADMINISTER right is
* already implied */
afs_int32 readonlyServer = 0;
#endif
#ifndef AFS_NT40_ENV
-struct fs_state fs_state =
- { FS_MODE_NORMAL,
- 0,
- 0,
- 0,
+struct fs_state fs_state =
+ { FS_MODE_NORMAL,
+ 0,
+ 0,
+ 0,
0,
{ 1,1,1,1 },
PTHREAD_COND_INITIALIZER,
#ifdef AFS_DEMAND_ATTACH_FS
if (fs_state.options.fs_state_save) {
- /*
+ /*
* demand attach fs
* save fileserver state to disk */
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-d")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -d\n");
- return -1;
+ fprintf(stderr, "missing argument for -d\n");
+ return -1;
}
debuglevel = atoi(argv[++i]);
LogLevel = debuglevel;
printBanner = 1;
} else if (!strcmp(argv[i], "-implicit")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -implicit\n");
- return -1;
+ fprintf(stderr, "missing argument for -implicit\n");
+ return -1;
}
implicitAdminRights = ParseRights(argv[++i]);
if (implicitAdminRights < 0)
max_fileserver_thread() - FILESERVER_HELPER_THREADS;
Sawlwps = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -p\n");
- return -1;
+ fprintf(stderr, "missing argument for -p\n");
+ return -1;
}
lwps = atoi(argv[++i]);
if (lwps > lwps_max)
} else if (!strcmp(argv[i], "-b")) {
Sawbufs = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -b\n");
- return -1;
+ fprintf(stderr, "missing argument for -b\n");
+ return -1;
}
buffs = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-l")) {
Sawlarge = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -l\n");
- return -1;
+ fprintf(stderr, "missing argument for -l\n");
+ return -1;
}
large = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-vc")) {
SawVC = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -vc\n");
- return -1;
+ fprintf(stderr, "missing argument for -vc\n");
+ return -1;
}
volcache = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-novbc")) {
} else if (!strcmp(argv[i], "-rxpck")) {
Sawrxpck = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -rxpck\n");
- return -1;
+ fprintf(stderr, "missing argument for -rxpck\n");
+ return -1;
}
rxpackets = atoi(argv[++i]);
#ifdef AFS_PTHREAD_ENV
} else if (!strcmp(argv[i], "-vattachpar")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for %s\n", argv[i]);
- return -1;
+ fprintf(stderr, "missing argument for %s\n", argv[i]);
+ return -1;
}
vol_attach_threads = atoi(argv[++i]);
#endif /* AFS_PTHREAD_ENV */
fs_state.options.fs_state_restore = 0;
} else if (!strcmp(argv[i], "-fs-state-verify")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for %s\n", argv[i]);
- return -1;
+ fprintf(stderr, "missing argument for %s\n", argv[i]);
+ return -1;
}
i++;
if (!strcmp(argv[i], "none")) {
}
} else if (!strcmp(argv[i], "-vhashsize")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for %s\n", argv[i]);
- return -1;
+ fprintf(stderr, "missing argument for %s\n", argv[i]);
+ return -1;
}
VSetVolHashSize(atoi(argv[++i]));
} else if (!strcmp(argv[i], "-vlrudisable")) {
VLRU_SetOptions(VLRU_SET_ENABLED, 0);
} else if (!strcmp(argv[i], "-vlruthresh")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for %s\n", argv[i]);
- return -1;
+ fprintf(stderr, "missing argument for %s\n", argv[i]);
+ return -1;
}
VLRU_SetOptions(VLRU_SET_THRESH, 60*atoi(argv[++i]));
} else if (!strcmp(argv[i], "-vlruinterval")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for %s\n", argv[i]);
- return -1;
+ fprintf(stderr, "missing argument for %s\n", argv[i]);
+ return -1;
}
VLRU_SetOptions(VLRU_SET_INTERVAL, atoi(argv[++i]));
} else if (!strcmp(argv[i], "-vlrumax")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for %s\n", argv[i]);
- return -1;
+ fprintf(stderr, "missing argument for %s\n", argv[i]);
+ return -1;
}
VLRU_SetOptions(VLRU_SET_MAX, atoi(argv[++i]));
} else if (!strcmp(argv[i], "-unsafe-nosalvage")) {
} else if (!strcmp(argv[i], "-s")) {
Sawsmall = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -s\n");
- return -1;
+ fprintf(stderr, "missing argument for -s\n");
+ return -1;
}
nSmallVns = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-abortthreshold")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -abortthreshold\n");
- return -1;
+ fprintf(stderr, "missing argument for -abortthreshold\n");
+ return -1;
}
abort_threshold = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-k")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -k\n");
- return -1;
+ fprintf(stderr, "missing argument for -k\n");
+ return -1;
}
stack = atoi(argv[++i]);
}
#endif
else if (!strcmp(argv[i], "-spare")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -spare\n");
- return -1;
+ fprintf(stderr, "missing argument for -spare\n");
+ return -1;
}
BlocksSpare = atoi(argv[++i]);
SawSpare = 1;
} else if (!strcmp(argv[i], "-pctspare")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -pctspare\n");
- return -1;
+ fprintf(stderr, "missing argument for -pctspare\n");
+ return -1;
}
PctSpare = atoi(argv[++i]);
BlocksSpare = 0; /* has non-zero default */
SawPctSpare = 1;
} else if (!strcmp(argv[i], "-w")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -w\n");
- return -1;
+ fprintf(stderr, "missing argument for -w\n");
+ return -1;
}
fiveminutes = atoi(argv[++i]);
} else if (!strcmp(argv[i], "-hr")) {
int hr;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -hr\n");
- return -1;
+ fprintf(stderr, "missing argument for -hr\n");
+ return -1;
}
hr = atoi(argv[++i]);
if ((hr < 1) || (hr > 36)) {
else if (!strcmp(argv[i], "-cb")) {
Sawcbs = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -cb\n");
- return -1;
+ fprintf(stderr, "missing argument for -cb\n");
+ return -1;
}
numberofcbs = atoi(argv[++i]);
if ((numberofcbs < 10000) || (numberofcbs > 2147483647)) {
} else if (!strcmp(argv[i], "-busyat")) {
Sawbusy = 1;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -busyat\n");
- return -1;
+ fprintf(stderr, "missing argument for -busyat\n");
+ return -1;
}
busy_threshold = atoi(argv[++i]);
if (busy_threshold < 10) {
else if (!strcmp(argv[i], "-m")) {
extern int aixlow_water;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -m\n");
- return -1;
+ fprintf(stderr, "missing argument for -m\n");
+ return -1;
}
aixlow_water = atoi(argv[++i]);
if ((aixlow_water < 0) || (aixlow_water > 30)) {
rxkadDisableDotCheck = 1;
} else if (!strcmp(argv[i], "-rxmaxmtu")) {
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -rxmaxmtu\n");
- return -1;
+ fprintf(stderr, "missing argument for -rxmaxmtu\n");
+ return -1;
}
rxMaxMTU = atoi(argv[++i]);
- if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
+ if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d%% invalid; must be between %d-%" AFS_SIZET_FMT "\n",
- rxMaxMTU, RX_MIN_PACKET_SIZE,
+ rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
return -1;
}
extern char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
extern int num_lrealms;
if ((i + 1) >= argc) {
- fprintf(stderr, "missing argument for -realm\n");
- return -1;
+ fprintf(stderr, "missing argument for -realm\n");
+ return -1;
}
if (strlen(argv[++i]) >= AFS_REALM_SZ) {
printf
AFS_REALM_SZ);
return -1;
}
- if (num_lrealms == -1)
+ if (num_lrealms == -1)
num_lrealms = 0;
if (num_lrealms >= AFS_NUM_LREALMS) {
printf
else if (strcmp(argv[i], "-mrafslogs") == 0) {
/* set syslog logging flag */
mrafsStyleLogs = 1;
- }
+ }
else if (strcmp(argv[i], "-saneacls") == 0) {
saneacls = 1;
}
}
/*
- * defect 10966
+ * defect 10966
* This routine sets up the buffers for the VL_RegisterAddrs RPC. All addresses
* in FS_HostAddrs[] are in NBO, while the RPC treats them as a "blob" of data
- * and so we need to convert each of them into HBO which is what the extra
+ * and so we need to convert each of them into HBO which is what the extra
* array called FS_HostAddrs_HBO is used here.
*/
static afs_int32
if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || AFSDIR_SERVER_NETINFO_FILEPATH) {
/*
- * Find addresses we are supposed to register as per the netrestrict
- * and netinfo files (/usr/afs/local/NetInfo and
+ * Find addresses we are supposed to register as per the netrestrict
+ * and netinfo files (/usr/afs/local/NetInfo and
* /usr/afs/local/NetRestict)
*/
char reason[1024];
if (FS_HostAddr_cnt == 1 && rxBind == 1)
code = FS_HostAddrs[0];
- else
+ else
code = htonl(INADDR_ANY);
return code;
}
#endif
CheckAdminName();
- /* if we support more than 16 threads, then we better have the ability
- ** to keep open a large number of files simultaneously
+ /* if we support more than 16 threads, then we better have the ability
+ ** to keep open a large number of files simultaneously
*/
#if defined(AFS_AIX_ENV) && !defined(AFS_AIX42_ENV)
curLimit = OPEN_MAX; /* for pre AIX 4.2 systems */
afsconf_BuildServerSecurityObjects(confDir, AFSCONF_SEC_OBJS_RXKAD_CRYPT,
&securityClasses, &numClasses);
- tservice = rx_NewServiceHost(rx_bindhost, /* port */ 0, /* service id */
+ tservice = rx_NewServiceHost(rx_bindhost, /* port */ 0, /* service id */
1, /*service name */
"AFS",
securityClasses, numClasses,
#endif
#if !defined(AFS_DEMAND_ATTACH_FS)
- /*
+ /*
* For DAFS, we do not start the Rx server threads until after
* the volume package is initialized, and fileserver state is
* restored. This is necessary in order to keep host and callback
#endif
/* we ensure that there is enough space in the vnode buffer to satisfy
- ** requests from all concurrent threads.
+ ** requests from all concurrent threads.
** the maximum number of vnodes used by a single thread at any one time
** is three ( "link" uses three vnodes simultaneously, one vLarge and
** two vSmall for linking files and two vLarge and one vSmall for linking
- ** files ) : dhruba
+ ** files ) : dhruba
*/
minVnodesRequired = 2 * lwps + 1;
if (minVnodesRequired > nSmallVns) {
/* We now do this after getting the listener up and running, so that client
* connections don't timeout (maybe) if a file server is restarted, since it
- * will be available "real soon now". Worry about whether we can satisfy the
+ * will be available "real soon now". Worry about whether we can satisfy the
* calls in the volume package itself.
*/
VOptDefaults(fileServer, &opts);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Revision 2.2 90/08/29 15:12:11
* Cleanups.
- *
+ *
* Revision 2.1 90/08/07 19:46:16
* Start with clean version to sync test and dev trees.
* */
volatile byte FsyncCheckLWP_tranquil; /* fsync check thread is shutdown or sleeping */
volatile byte salvsync_fatal_error; /* fatal error with salvsync comm */
- /* some command-line options we use in
+ /* some command-line options we use in
* various places
*
* these fields are immutable once we
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
exit(1);
}
- /* Because we know that all the vldb entries are the same size and type we
+ /* Because we know that all the vldb entries are the same size and type we
* can just read them sequentially, fiddle with the fields, and write
* them out again. If we invent a vldb format that has different
* types of entries, then we're going to have to invent new logic for
if (!mh_addr)
return;
- /* Check if the first extent block is beyond eof. If
+ /* Check if the first extent block is beyond eof. If
* it is, it's not real.
*/
if (mh_addr > dbsize - VL_ADDREXTBLK_SIZE)
sit = ntohl(base[0]->ex_contaddrs[j]);
- /* Every time we allocate a new extent block, it is allocated after
+ /* Every time we allocate a new extent block, it is allocated after
* the previous ones. But it must be before the EOF.
*/
if ((sit < (a + VL_ADDREXTBLK_SIZE))
* extent blocks and verify that the pointers are good. And fix.
* Then convert the multihomed addresses to single address if we
* are converting back from version 4.
- *
+ *
* Before this can be called, the routine read_mhentries must be called.
*/
void
}
}
- /* If we are converting from version 4 to version 3, then
+ /* If we are converting from version 4 to version 3, then
* translate any multihome ptrs in the IpMappedAddr array
* to true IP addresses.
*/
/* Convert an address pointer to a vlentry from version 4 to version 3.
* This involves checking if the address is after any of the four
- * MH block and if it is, subtract the size of the MH block.
+ * MH block and if it is, subtract the size of the MH block.
*
* In going from version 4 to 3, the mh blocks go away and all entries
* move up in their place. The adresses then need to be updated.
return (raddr);
}
-/* this only works because the vlheader struct is essentially the same
+/* this only works because the vlheader struct is essentially the same
* from version 1 to version 2 -- that is, the first bunch of fields
* aren't any more or any larger, so they match up pretty well.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
vl_Initialize(int auth, char *confDir, int server, char *cellp)
{
return ugen_ClientInit(auth?0:1, confDir, cellp, 0,
- &cstruct, NULL, "vl_Initialize", rxkad_clear,
+ &cstruct, NULL, "vl_Initialize", rxkad_clear,
MAXSERVERS, AFSCONF_VLDBSERVICE, 50, server,
htons(AFSCONF_VLDBPORT), USER_SERVICE_ID);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int fix = 0;
int passes = 0;
/* if quiet, don't send anything to stdout */
-int quiet = 0;
+int quiet = 0;
/* error level. 0 = no error, 1 = warning, 2 = error, 4 = fatal */
-int error_level = 0;
+int error_level = 0;
struct er {
long addr;
int serveraddrs[MAXSERVERID + 2];
/* Used to control what goes to stdout based on quiet flag */
-void
+void
quiet_println(const char *fmt,...) {
- va_list args;
+ va_list args;
if (!quiet) {
- va_start(args, fmt);
- vfprintf(stdout, fmt, args);
- va_end(args);
+ va_start(args, fmt);
+ vfprintf(stdout, fmt, args);
+ va_end(args);
}
}
/* Used to set the error level and ship messages to stderr */
-void
-log_error(int eval, const char *fmt, ...)
-{
- va_list args;
+void
+log_error(int eval, const char *fmt, ...)
+{
+ va_list args;
if (error_level < eval) error_level = eval ; /* bump up the severity */
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- va_end(args);
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
if (error_level == VLDB_CHECK_FATAL) exit(VLDB_CHECK_FATAL);
-}
+}
#if 0
return (-1);
}
- if (rdwr == 1)
+ if (rdwr == 1)
r = write(fd, buffer, size);
- else
+ else
r = read(fd, buffer, size);
if (r != size) {
continue;
}
if (e) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"VLDB entry '%s' contains an unknown RW/RO index serverFlag\n",
vlentry.name);
e = 0;
* checked it either above or below
*/
if (record[rindex].addr != addr && record[rindex].addr) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %ld and %u use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
if (record[rindex].type & NH) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Name Hash %d: Bad entry '%s': Already in the name hash\n",
i, vlentry.name);
record[rindex].type |= MULTN;
/* Hash the name and check if in correct hash table */
if (NameHash(vlentry.name) != i) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Name Hash %d: Bad entry '%s': Incorrect name hash chain (should be in %d)\n",
i, vlentry.name, NameHash(vlentry.name));
record[rindex].type |= MULTN;
/* Hash the id and check if in correct hash table */
if (IdHash(vlentry.volumeId[i]) != j) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"%s Id Hash %d: Bad entry '%s': Incorrect Id hash chain (should be in %d)\n",
vtype(i), j, vlentry.name,
IdHash(vlentry.volumeId[i]));
addr = vlentry.nextIdHash[0]) {
readentry(addr, &vlentry, &type);
if (type != FR) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Free Chain %d: Bad entry at %u: Not a valid free vlentry (0x%x)\n",
count, addr, type);
continue;
rindex = addr / sizeof(vlentry);
if (record[rindex].addr != addr && record[rindex].addr) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %ld use same record slot %d\n",
record[rindex].addr, addr, rindex);
}
* Read each multihomed block and mark it as found in the record.
* Read each entry in each multihomed block and mark the serveraddrs
* array with the number of ip addresses found for this entry.
- *
+ *
* Then read the IpMappedAddr array in the header.
* Verify that multihomed entries base and index are valid and points to
* a good multhomed entry.
* Mark the serveraddrs array with 1 ip address for regular entries.
- *
- * By the end, the severaddrs array will have a 0 if the entry has no
+ *
+ * By the end, the severaddrs array will have a 0 if the entry has no
* IP addresses in it or the count of the number of IP addresses.
*
- * The code does not verify if there are duplicate IP addresses in the
+ * The code does not verify if there are duplicate IP addresses in the
* list. The vlserver does this when a fileserver registeres itself.
*/
void
quiet_println("Check Multihomed blocks\n");
if (header->SIT) {
- /* Read the first MH block and from it, gather the
+ /* Read the first MH block and from it, gather the
* addresses of all the mh blocks.
*/
readMH(header->SIT, MHblock);
if (MHblock->ex_flags != VLCONTBLOCK) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Multihomed Block 0: Bad entry at %u: Not a valid multihomed block\n",
header->SIT);
}
}
if (header->SIT != caddrs[0]) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"MH block does not point to self %u in header, %u in block\n",
header->SIT, caddrs[0]);
}
readMH(caddrs[i], MHblock);
if (MHblock->ex_flags != VLCONTBLOCK) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Multihomed Block 0: Bad entry at %u: Not a valid multihomed block\n",
header->SIT);
}
rindex = caddrs[i] / sizeof(vlentry);
if (record[rindex].addr != caddrs[i] && record[rindex].addr) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"INTERNAL VLDB_CHECK_ERROR: addresses %u and %u use same record slot %d\n",
record[rindex].addr, caddrs[i], rindex);
}
if (record[rindex].type & FRC) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"MH Blocks Chain %d: Bad entry at %ld: Already a MH block\n",
i, record[rindex].addr);
break;
mhblocks++;
- /* Read each entry in a multihomed block.
+ /* Read each entry in a multihomed block.
* Find the pointer to the entry in the IpMappedAddr array and
* verify that the entry is good (has IP addresses in it).
*/
if (memcmp(&e->ex_hostuuid, &nulluuid, sizeof(afsUUID)) == 0) {
if (ipindex != -1) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Server Addrs index %d references null MH block %d, index %d\n",
ipindex, i, j);
serveraddrs[ipindex] = 0; /* avoids printing 2nd error below */
if (ipaddrs) {
mhentries++;
if (ipindex == -1) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"MH block %d, index %d: Not referenced by server addrs\n",
i, j);
} else {
mhentries++;
if (((header->IpMappedAddr[i] & 0x00ff0000) >> 16) >
VL_MAX_ADDREXTBLKS)
- log_error
+ log_error
(VLDB_CHECK_ERROR,"IP Addr for entry %d: Multihome block is bad (%d)\n",
i, ((header->IpMappedAddr[i] & 0x00ff0000) >> 16));
if (((header->IpMappedAddr[i] & 0x0000ffff) > VL_MHSRV_PERBLK)
|| ((header->IpMappedAddr[i] & 0x0000ffff) < 1))
- log_error
+ log_error
(VLDB_CHECK_ERROR,"IP Addr for entry %d: Multihome index is bad (%d)\n",
i, (header->IpMappedAddr[i] & 0x0000ffff));
if (serveraddrs[i] == -1) {
- log_error
+ log_error
(VLDB_CHECK_WARNING,"warning: IP Addr for entry %d: Multihome entry has no ip addresses\n",
i);
serveraddrs[i] = 0;
FollowFreeChain(&header);
/* Now check the record we have been keeping for inconsistencies
- * For valid vlentries, also check that the server we point to is
+ * For valid vlentries, also check that the server we point to is
* valid (the serveraddrs array).
*/
if (verbose)
for (j = 0; j < NMAXNSERVERS; j++) {
if ((vlentry.serverNumber[j] != 255)
&& (serveraddrs[vlentry.serverNumber[j]] == 0)) {
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Volume '%s', index %d points to empty server entry %d\n",
vlentry.name, j, vlentry.serverNumber[j]);
}
}
-
+
if (record[i].type & 0xffff0f00)
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Volume '%s' id %u also found on other chains (0x%x)\n",
vlentry.name, vlentry.volumeId[0], record[i].type);
-
+
/* A free entry */
} else if (record[i].type & FR) {
if (!(record[i].type & FRC))
log_error(VLDB_CHECK_ERROR,"Free vlentry at %ld not on free chain\n",
record[i].addr);
-
+
if (record[i].type & 0xfffffdf0)
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Free vlentry at %ld also found on other chains (0x%x)\n",
record[i].addr, record[i].type);
-
+
/* A multihomed entry */
} else if (record[i].type & MH) {
if (!(record[i].type & MHC))
log_error(VLDB_CHECK_ERROR,"Multihomed block at %ld is orphaned\n",
record[i].addr);
-
+
if (record[i].type & 0xfffffef0)
- log_error
+ log_error
(VLDB_CHECK_ERROR,"Multihomed block at %ld also found on other chains (0x%x)\n",
record[i].addr, record[i].type);
-
+
} else {
log_error(VLDB_CHECK_ERROR,"Unknown entry type at %u (0x%x)\n", record[i].addr,
record[i].type);
if (record[i].type & VL) {
readentry(record[i].addr, &vlentry, &type);
if (!(record[i].type & REFN)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a name chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a name chain\n", i,
record[i].addr, record[i].type);
}
if (vlentry.volumeId[0] && !(record[i].type & REFRW)) {
record[i].addr, record[i].type);
}
if (vlentry.volumeId[1] && !(record[i].type & REFRO)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a RO chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a RO chain\n", i,
record[i].addr, record[i].type);
}
if (vlentry.volumeId[2] && !(record[i].type & REFBK)) {
- log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a BK chain\n", i,
+ log_error(VLDB_CHECK_ERROR,"%d: Record %ld (type 0x%x) not in a BK chain\n", i,
record[i].addr, record[i].type);
}
if (fix) {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
namematchRWBK = (thismatch ? 1 : 2);
}
- /* Match with the RO volume name. Compare once and
+ /* Match with the RO volume name. Compare once and
* remember results in namematchRO. Note that this will
* pick up entries marked NEWREPSITEs and DONTUSE.
*/
if (count == 1)
VLog(0, (" You must 'vos changeaddr' this other server entry\n"));
else
- VLog(0,
+ VLog(0,
(" You must 'vos changeaddr' these other server entries\n"));
if (foundUuidEntry)
- VLog(0,
+ VLog(0,
(" and/or remove the sysid file from the registering fileserver\n"));
VLog(0, (" before the fileserver can be registered in the VLDB.\n"));
VLog(0, ("]\n"));
if (foundUuidEntry) {
- VLog(0,
+ VLog(0,
(" It will replace the following existing entry in the VLDB (same uuid):\n"));
VLog(0, (" entry %d: [", FoundUuid));
for (k = 0; k < VL_MAXIPADDRS_PERMH; k++) {
index = HostAddress[ReplaceEntry] & 0x0000ffff;
exp = &ex_addr[fbase][index];
- VLog(0,
+ VLog(0,
(" It will replace the following existing entry in the VLDB (new uuid):\n"));
VLog(0, (" entry %d: [", ReplaceEntry));
for (k = 0; k < VL_MAXIPADDRS_PERMH; k++) {
}
VLog(0, ("]\n"));
} else {
- /* Not a mh entry. So we have to create a new mh entry and
+ /* Not a mh entry. So we have to create a new mh entry and
* put it on the ReplaceEntry slot of the HostAddress array.
*/
VLog(0, (" It will replace existing entry %d, ", ReplaceEntry));
return VL_IO;
}
- /* Remove any common addresses from other mh entres. We know these entries
+ /* Remove any common addresses from other mh entres. We know these entries
* are being changed and not replaced so they are mh entries.
*/
m = 0;
tex = &ex_addr[fbase][index];
if (++m == 1)
- VLog(0,
+ VLog(0,
(" The following existing entries in the VLDB will be updated:\n"));
VLog(0, (" entry %d: [", WillChange[i]));
return VL_SIZEEXCEEDED; /* no growing if smallMem defined */
/* Allocate another set of memory; each time allocate twice as
- * many blocks as the last time. When we reach VLDBALLOCLIMIT,
+ * many blocks as the last time. When we reach VLDBALLOCLIMIT,
* then grow in increments of VLDBALLOCINCR.
*/
allo = (*alloccnt > VLDBALLOCLIMIT) ? VLDBALLOCINCR : *alloccnt;
return VL_SIZEEXCEEDED; /* no growing if smallMem defined */
/* Allocate another set of memory; each time allocate twice as
- * many blocks as the last time. When we reach VLDBALLOCLIMIT,
+ * many blocks as the last time. When we reach VLDBALLOCLIMIT,
* then grow in increments of VLDBALLOCINCR.
*/
allo = (*alloccnt > VLDBALLOCLIMIT) ? VLDBALLOCINCR : *alloccnt;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
}
} else if (strcmp(argv[index], "-d") == 0) {
if ((index + 1) >= argc) {
- fprintf(stderr, "missing argument for -d\n");
- return -1;
+ fprintf(stderr, "missing argument for -d\n");
+ return -1;
}
debuglevel = atoi(argv[++index]);
LogLevel = debuglevel;
rxkadDisableDotCheck = 1;
} else if (!strcmp(argv[index], "-rxmaxmtu")) {
if ((index + 1) >= argc) {
- fprintf(stderr, "missing argument for -rxmaxmtu\n");
- return -1;
+ fprintf(stderr, "missing argument for -rxmaxmtu\n");
+ return -1;
}
rxMaxMTU = atoi(argv[++index]);
- if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
+ if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%" AFS_SIZET_FMT "\n",
- rxMaxMTU, RX_MIN_PACKET_SIZE,
+ rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
return -1;
}
if (rxBind) {
afs_int32 ccode;
#ifndef AFS_NT40_ENV
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
-#endif
+ } else
+#endif
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* If a directory, mark vnode in old volume as cloned */
if ((rwvnode->type == vDirectory) && ReadWriteOriginal) {
#ifdef DVINC
- /*
+ /*
* It is my firmly held belief that immediately after
* copy-on-write, the two directories can be identical.
* If the new copy is changed (presumably, that is the very
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2006-2008, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
now = FT_ApproxTime();
timeout = now + state->hard_timeout;
- for (tries = 0;
+ for (tries = 0;
(tries <= state->retry_limit) && (now <= timeout);
tries++, now = FT_ApproxTime()) {
code = SYNC_ask_internal(state, com, res);
SYNC_reconnect(state);
/* try again */
} else {
- /*
- * unknown (probably protocol-specific) response code, pass it up to
- * the caller, and let them deal with it
+ /*
+ * unknown (probably protocol-specific) response code, pass it up to
+ * the caller, and let them deal with it
*/
break;
}
if (code == SYNC_COM_ERROR) {
Log("SYNC_ask: fatal protocol error on circuit '%s'; disabling sync "
- "protocol until next server restart\n",
+ "protocol until next server restart\n",
state->proto_name);
state->fatal_error = 1;
}
memcpy(buf, &com->hdr, sizeof(com->hdr));
if (com->payload.len) {
- memcpy(buf + sizeof(com->hdr), com->payload.buf,
+ memcpy(buf + sizeof(com->hdr), com->payload.buf,
com->hdr.command_len - sizeof(com->hdr));
}
res->recv_len = n;
if (n < sizeof(res->hdr)) {
- Log("SYNC_ask: response too short on circuit '%s'\n",
+ Log("SYNC_ask: response too short on circuit '%s'\n",
state->proto_name);
res->hdr.response = SYNC_COM_ERROR;
goto done;
#endif
if ((n - sizeof(res->hdr)) > res->payload.len) {
- Log("SYNC_ask: response too long on circuit '%s'\n",
+ Log("SYNC_ask: response too long on circuit '%s'\n",
state->proto_name);
res->hdr.response = SYNC_COM_ERROR;
goto done;
}
-/*
- * daemon com SYNC server-side interfaces
+/*
+ * daemon com SYNC server-side interfaces
*/
/**
* @retval SYNC_COM_ERROR
*/
afs_int32
-SYNC_putRes(SYNC_server_state_t * state,
+SYNC_putRes(SYNC_server_state_t * state,
osi_socket fd,
SYNC_response * res)
{
memcpy(buf, &res->hdr, sizeof(res->hdr));
if (res->payload.len) {
- memcpy(buf + sizeof(res->hdr), res->payload.buf,
+ memcpy(buf + sizeof(res->hdr), res->payload.buf,
res->hdr.response_len - sizeof(res->hdr));
}
Log("SYNC_bindSock: setsockopt failed with (%d)\n", errno);
for (numTries = 0; numTries < state->bind_retry_limit; numTries++) {
- code = bind(state->fd,
- (struct sockaddr *)&state->addr,
+ code = bind(state->fd,
+ (struct sockaddr *)&state->addr,
AFS_SOCKADDR_LEN(&state->addr));
if (code == 0)
break;
/*
* Copyright 2006-2008, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef _AFS_VOL_DAEMON_COM_H
#define _AFS_VOL_DAEMON_COM_H 1
-/*
+/*
* SYNC protocol constants
*/
#define SYNC_COM_CODE_USER_BASE 65536
#define SYNC_COM_CODE_DECL(code) (SYNC_COM_CODE_USER_BASE+(code))
-/**
+/**
* general command codes.
*/
enum SYNCOpCode {
/* SYNC protocol response codes
*
- * response codes 0-65535 are reserved for
+ * response codes 0-65535 are reserved for
* global SYNC package response codes
*/
#define SYNC_RES_CODE_USER_BASE 65536
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern int LogLevel;
-static SYNC_client_state fssync_state =
+static SYNC_client_state fssync_state =
{ -1, /* file descriptor */
FSSYNC_ENDPOINT_DECL, /* server endpoint */
FSYNC_PROTO_VERSION, /* protocol version */
}
afs_int32
-FSYNC_VolOp(VolumeId volume, char * partition,
+FSYNC_VolOp(VolumeId volume, char * partition,
int command, int reason,
SYNC_response * res)
{
/*
* Copyright 2006-2010, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
exit(2);
}
-
+
ts = cmd_CreateSyntax("online", VolOnline, NULL, "bring a volume online (FSYNC_VOL_ON opcode)");
VOLOP_PARMS_DECL(ts);
res->payload.buf = res_buf;
}
- fprintf(stderr, "calling FSYNC_VolOp with command code %d (%s)\n",
+ fprintf(stderr, "calling FSYNC_VolOp with command code %d (%s)\n",
command, FSYNC_com2string(command));
code = FSYNC_VolOp(state->vop->volume,
} \
} while (0)
-static int
+static int
VolOnline(struct cmd_syndesc * as, void * rock)
{
struct state state;
return 0;
}
-static int
+static int
VolOffline(struct cmd_syndesc * as, void * rock)
{
struct state state;
printf("\tneedsPutBack = %d\n", v.needsPutBack);
printf("\tspecialStatus = %d\n", v.specialStatus);
printf("\tupdateTime = %u\n", v.updateTime);
-
+
printf("\tvnodeIndex[vSmall] = {\n");
printf("\t\thandle = %p\n", v.vnodeIndex[vSmall].handle);
printf("\t\tbitmap = %p\n", v.vnodeIndex[vSmall].bitmap);
printf("\tattach_flags = %s\n", vol_flags_to_string(v.attach_flags));
printf("\tnWaiters = %d\n", v.nWaiters);
printf("\tchainCacheCheck = %d\n", v.chainCacheCheck);
-
+
/* online salvage structure */
printf("\tsalvage = {\n");
printf("\t\tprio = %u\n", v.salvage.prio);
printf("\t\trequested = %d\n", v.salvage.requested);
printf("\t\tscheduled = %d\n", v.salvage.scheduled);
printf("\t}\n");
-
+
/* statistics structure */
printf("\tstats = {\n");
printf("\t\t\thi = %u\n", hi);
printf("\t\t\tlo = %u\n", lo);
printf("\t\t}\n");
-
+
printf("\t\tattaches = %u\n", v.stats.attaches);
printf("\t\tsoft_detaches = %u\n", v.stats.soft_detaches);
printf("\t\tsalvages = %u\n", v.stats.salvages);
printf("\t\tvol_ops = %u\n", v.stats.vol_ops);
-
+
printf("\t\tlast_attach = %u\n", v.stats.last_attach);
printf("\t\tlast_get = %u\n", v.stats.last_get);
printf("\t\tlast_promote = %u\n", v.stats.last_promote);
printf("\t\tlast_salvage_req = %u\n", v.stats.last_salvage_req);
printf("\t\tlast_vol_op = %u\n", v.stats.last_vol_op);
printf("\t}\n");
-
+
/* VLRU state */
printf("\tvlru = {\n");
- printf("\t\tidx = %d (%s)\n",
+ printf("\t\tidx = %d (%s)\n",
v.vlru.idx, vlru_idx_to_string(v.vlru.idx));
printf("\t}\n");
printf("\t\tmagic = 0x%x\n", v.stamp.magic);
printf("\t\tversion = %u\n", v.stamp.version);
printf("\t}\n");
-
+
printf("\tid = %u\n", v.id);
printf("\tname = '%s'\n", v.name);
if (v.inUse != 0) {
printf("\t\tproto_version = %u\n", vop.com.proto_version);
printf("\t\tpkt_seq = %u\n", vop.com.pkt_seq);
printf("\t\tcom_seq = %u\n", vop.com.com_seq);
- printf("\t\tprogramType = %d (%s)\n",
+ printf("\t\tprogramType = %d (%s)\n",
vop.com.programType, VPTypeToString(vop.com.programType));
printf("\t\tpid = %d\n", vop.com.pid);
printf("\t\ttid = %d\n", vop.com.tid);
- printf("\t\tcommand = %d (%s)\n",
+ printf("\t\tcommand = %d (%s)\n",
vop.com.command, FSYNC_com2string(vop.com.command));
- printf("\t\treason = %d (%s)\n",
+ printf("\t\treason = %d (%s)\n",
vop.com.reason, FSYNC_reason2string(vop.com.reason));
printf("\t\tcommand_len = %u\n", vop.com.command_len);
printf("\t\tflags = 0x%lux\n", afs_printable_uint32_lu(vop.com.flags));
qry.spare = 0;
strlcpy(qry.partName, state->vop->partName, sizeof(qry.partName));
- fprintf(stderr, "calling FSYNC_GenericOp with command code %d (%s)\n",
+ fprintf(stderr, "calling FSYNC_GenericOp with command code %d (%s)\n",
command, FSYNC_com2string(command));
code = FSYNC_GenericOp(&qry, sizeof(qry), command, FSYNC_OPERATOR, res);
common_prolog(as, &state);
- fprintf(stderr, "calling FSYNC_askfs with command code %d (%s)\n",
+ fprintf(stderr, "calling FSYNC_askfs with command code %d (%s)\n",
command, FSYNC_com2string(command));
code = FSYNC_StatsOp(&scom, command, FSYNC_WHATEVER, &res);
}
fprintf(stderr, "FSYNC_VolOp returned %d (%s)\n", code, SYNC_res2string(code));
- fprintf(stderr, "protocol response code was %d (%s)\n",
+ fprintf(stderr, "protocol response code was %d (%s)\n",
res.hdr.response, SYNC_res2string(res.hdr.response));
- fprintf(stderr, "protocol reason code was %d (%s)\n",
+ fprintf(stderr, "protocol reason code was %d (%s)\n",
res.hdr.reason, FSYNC_reason2string(res.hdr.reason));
VDisconnectFS();
printf("VolPkgStats = {\n");
#ifdef AFS_DEMAND_ATTACH_FS
for (i = 0; i < VOL_STATE_COUNT; i++) {
- printf("\tvol_state_count[%s] = %d\n",
+ printf("\tvol_state_count[%s] = %d\n",
vol_state_to_string(i),
stats->state_levels[i]);
}
printf("\t}\n");
printf("\thdr_cache_size = %d\n", stats->hdr_cache_size);
-
+
printf("}\n");
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/**
* fssync server socket handle.
*/
-static SYNC_server_state_t fssync_server_state =
+static SYNC_server_state_t fssync_server_state =
{ -1, /* file descriptor */
FSSYNC_ENDPOINT_DECL, /* server endpoint */
FSYNC_PROTO_VERSION, /* protocol version */
vp = VLookupVolume_r(&error, vcom->vop->volume, NULL);
if (vp &&
FSYNC_partMatch(vcom, vp, 1) &&
- vp->pending_vol_op &&
+ vp->pending_vol_op &&
(vcom->hdr->programType != vp->pending_vol_op->com.programType)) {
/* a different program has this volume checked out. deny. */
Log("FSYNC_VolOn: WARNING: program type %u has attempted to manipulate "
- "state for volume %u using command code %u while the volume is "
+ "state for volume %u using command code %u while the volume is "
"checked out by program type %u for command code %u.\n",
vcom->hdr->programType,
vcom->vop->volume,
* @note this is an FSYNC RPC server stub
*
* @note this procedure handles the following FSSYNC command codes:
- * - FSYNC_VOL_OFF
+ * - FSYNC_VOL_OFF
* - FSYNC_VOL_NEEDVOLUME
*
* @note the supplementary reason code contains additional details.
Log("volume %u already checked out\n", vp->hashid);
/* XXX debug */
Log("vp->vop = { com = { ver=%u, prog=%d, com=%d, reason=%d, len=%u, flags=0x%x }, vop = { vol=%u, part='%s' } }\n",
- vp->pending_vol_op->com.proto_version,
+ vp->pending_vol_op->com.proto_version,
vp->pending_vol_op->com.programType,
vp->pending_vol_op->com.command,
vp->pending_vol_op->com.reason,
*/
switch (type) {
case salvageServer:
- /* it is possible for the salvageserver to checkout a
+ /* it is possible for the salvageserver to checkout a
* volume for salvage before its scheduling request
* has been sent to the salvageserver */
if (vp->salvage.requested && !vp->salvage.scheduled) {
if (VVolOpLeaveOnline_r(vp, &info)) {
VUpdateVolume_r(&error, vp, VOL_UPDATE_WAIT); /* At least get volume stats right */
if (LogLevel) {
- Log("FSYNC: Volume %u (%s) was left on line for an external %s request\n",
- V_id(vp), V_name(vp),
- vcom->hdr->reason == V_CLONE ? "clone" :
- vcom->hdr->reason == V_READONLY ? "readonly" :
- vcom->hdr->reason == V_DUMP ? "dump" :
+ Log("FSYNC: Volume %u (%s) was left on line for an external %s request\n",
+ V_id(vp), V_name(vp),
+ vcom->hdr->reason == V_CLONE ? "clone" :
+ vcom->hdr->reason == V_READONLY ? "readonly" :
+ vcom->hdr->reason == V_DUMP ? "dump" :
vcom->hdr->reason == FSYNC_SALVAGE ? "salvage" :
"UNKNOWN");
}
VOfflineForVolOp_r(&error, vp, "A volume utility is running.");
if (error==0) {
assert(vp->nUsers==0);
- vp->pending_vol_op->vol_op_state = FSSYNC_VolOpRunningOffline;
+ vp->pending_vol_op->vol_op_state = FSSYNC_VolOpRunningOffline;
}
else {
VDeregisterVolOp_r(vp);
stats->minFree = dp->minFree;
stats->f_files = dp->f_files;
stats->vol_list_len = dp->vol_list.len;
-
+
res->hdr.response_len += sizeof(struct DiskPartitionStats64);
}
AssignInt64(head->reorders, &stats->chain_reorders);
res->hdr.response_len += sizeof(struct VolumeHashChainStats);
-
+
return code;
}
}
/**
- * check whether command packet partition name matches volume
+ * check whether command packet partition name matches volume
* object's partition name.
*
* @param[in] vcom pointer to command packet
*
* @internal
*/
-static int
+static int
FSYNC_partMatch(FSSYNC_VolOp_command * vcom, Volume * vp, int match_anon)
{
return ((match_anon && vcom->vop->partName[0] == 0) ||
- (strncmp(vcom->vop->partName, V_partition(vp)->name,
+ (strncmp(vcom->vop->partName, V_partition(vp)->name,
sizeof(vcom->vop->partName)) == 0));
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
};
/**
- * FSYNC reason codes.
+ * FSYNC reason codes.
*/
enum FSYNCReasonCode {
FSYNC_WHATEVER = SYNC_REASON_CODE_DECL(0), /**< XXXX */
typedef struct FSSYNC_VolOp_info {
SYNC_command_hdr com;
FSSYNC_VolOp_hdr vop;
- enum FSSYNC_VolOpState vol_op_state;
+ enum FSSYNC_VolOpState vol_op_state;
} FSSYNC_VolOp_info;
*/
extern void FSYNC_Init(void);
-/*
- * fsync client interfaces
+/*
+ * fsync client interfaces
*/
extern void FSYNC_clientFinis(void);
extern int FSYNC_clientInit(void);
SYNC_response * res);
/* volume operations control interface */
-extern afs_int32 FSYNC_VolOp(VolumeId volume, char *partName, int com, int reason,
+extern afs_int32 FSYNC_VolOp(VolumeId volume, char *partName, int com, int reason,
SYNC_response * res);
/* statistics query interface */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (ihP->ih_synced) {
FdHandle_t *fdP;
IH_UNLOCK;
-
+
fdP = IH_OPEN(ihP);
- if (fdP) {
+ if (fdP) {
OS_SYNC(fdP->fd_fd);
FDH_CLOSE(fdP);
}
-
+
IH_LOCK;
}
if (ihP)
ihP->ih_refcnt++; /* must not disappear over unlock */
for (; ihP; ihP = ihPnext) {
-
+
if (ihP->ih_synced) {
FdHandle_t *fdP;
IH_UNLOCK;
fdP = IH_OPEN(ihP);
- if (fdP) {
+ if (fdP) {
OS_SYNC(fdP->fd_fd);
FDH_CLOSE(fdP);
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* pass the elements required to identify a file to the underlying file
* systen. For the usual Vice inode operations, this is no more than the
* usual device and inode numbers. For the user space file system used on NT
- * we also need the volume id to identify the file.
+ * we also need the volume id to identify the file.
*
* An FdHandle_t is an abstraction used to associate file descroptors
* with Inode handles. IH_OPEN is used to get a file descriptor that
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* xfs_ListViceInodes
*
* xfs_ListViceInodes verifies and correct the XFS namespace as it collects
- * the inode information. The name is required for the idec operation to work.
+ * the inode information. The name is required for the idec operation to work.
* Steps 2 and 3 below are for the AFS_XFS_NAME_VERS == 1. If the name space
- * changes, the algorithm will need to change.
+ * changes, the algorithm will need to change.
* 1) If the parent inode number does not match the directory's inod number,
* change it in the attribute.
* 2) If the unqifier in the attribute does not match the name, rename the
*/
/* xfs_VerifyInode
- *
+ *
* Does the verifications listed above.
* We can't change the names until the readdir is complete, so we set the
* rename flag if the file needs renaming.
err = -2;
goto out1;
}
-
+
/*
* Paranoia: check that the file is really the right size
*/
vd.type = RWVOL;
vd.dontSalvage = 0;
vd.inUse = 0;
- vd.uniquifier += 5000; /* just in case there are still file copies
+ vd.uniquifier += 5000; /* just in case there are still file copies
from the old RW volume around */
p = strrchr(vd.name, '.');
int
-UpdateThisVolume(struct ViceInodeInfo *inodeinfo, VolumeId singleVolumeNumber,
+UpdateThisVolume(struct ViceInodeInfo *inodeinfo, VolumeId singleVolumeNumber,
struct specino *specinos)
{
struct dinode *p;
if ((inodeinfo->u.vnode.vnodeNumber == INODESPECIAL) &&
(inodeinfo->u.vnode.volumeId == singleVolumeNumber)) {
- specinos[inodeinfo->u.special.type].inodeNumber =
+ specinos[inodeinfo->u.special.type].inodeNumber =
inodeinfo->inodeNumber;
}
return 0; /* We aren't using a result file, we're caching */
memset(&specinos, 0, sizeof(specinos));
/* now do the work */
-
+
for (partP = DiskPartitionList; partP && strcmp(partP->name, pname);
partP = partP->next);
if (!partP) {
goto done;
}
#endif
-
+
if (VReadVolumeDiskHeader(volumeId, partP, &h)) {
Log("1 inode_ConvertROtoRWvolume: Couldn't read header for RO-volume %lu.\n",
afs_printable_uint32_lu(volumeId));
strcpy(tmpDevName, partP->devName);
name = getDevName(tmpDevName, wpath);
- if ((err = ListViceInodes(name, VPartitionPath(partP),
- NULL, UpdateThisVolume, volumeId,
+ if ((err = ListViceInodes(name, VPartitionPath(partP),
+ NULL, UpdateThisVolume, volumeId,
&forcep, 0, wpath, &specinos)) < 0)
{
Log("1 inode_ConvertROtoRWvolume: Couldn't get special inodes\n");
code = EIO;
goto done;
}
-
+
#if defined(NEARINODE_HINT)
nearInodeHash(volumeId, nearInode);
nearInode %= partP->f_files;
for (j = VI_VOLINFO; j < VI_LINKTABLE+1; j++) {
if (specinos[j].inodeNumber > 0) {
- specinos[j].ninodeNumber =
+ specinos[j].ninodeNumber =
IH_CREATE(NULL, partP->device, VPartitionPath(partP),
nearInode, h.parent, INODESPECIAL, j, h.parent);
- IH_INIT(ih, partP->device, volumeId,
+ IH_INIT(ih, partP->device, volumeId,
specinos[j].inodeNumber);
fdP = IH_OPEN(ih);
if (!fdP) {
- Log("1 inode_ConvertROtoRWvolume: Couldn't find special inode %d for %d\n", j, volumeId);
+ Log("1 inode_ConvertROtoRWvolume: Couldn't find special inode %d for %d\n", j, volumeId);
code = -1;
goto done;
}
-
+
IH_INIT(ih2, partP->device, h.parent, specinos[j].ninodeNumber);
- fdP2 = IH_OPEN(ih2);
- if (!fdP2) {
- Log("1 inode_ConvertROtoRWvolume: Couldn't find special inode %d for %d\n", j, h.parent);
+ fdP2 = IH_OPEN(ih2);
+ if (!fdP2) {
+ Log("1 inode_ConvertROtoRWvolume: Couldn't find special inode %d for %d\n", j, h.parent);
code = -1;
goto done;
- }
-
+ }
+
if (j == VI_VOLINFO)
convertVolumeInfo(fdP->fd_fd, fdP2->fd_fd, ih2->ih_vid);
else {
if (nBytes != len) {
code = -1;
goto done;
- }
+ }
}
}
-
+
FDH_CLOSE(fdP);
FDH_CLOSE(fdP2);
IH_RELEASE(ih2);
}
}
-
+
h.id = h.parent;
#ifdef AFS_64BIT_IOPS_ENV
h.volumeInfo_lo = (afs_int32)specinos[VI_VOLINFO].ninodeNumber & 0xffffffff;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* This function emulates a subset of flock()
*/
-int
+int
emul_flock(int fd, int cmd)
{ struct flock f;
/* Inode number format:
* low 26 bits - vnode number - all 1's if volume special file.
- * next 3 bits - tag
+ * next 3 bits - tag
* next 3 bits spare (0's)
* high 32 bits - uniquifier (regular) or type if spare
*/
* Output:
* errp : errno of the first error encountered during the directory cleanup.
* *errp should have been initialized to 0.
- *
+ *
* Return Values:
- * -1 : If errors were encountered during cleanup and error is set to
+ * -1 : If errors were encountered during cleanup and error is set to
* the first errno.
* 0 : Success.
*
if (!strcmp(dirp->d_name, ".") || !strcmp(dirp->d_name, ".."))
continue;
/* since root is big enough, we reuse the space to
- * concatenate the dirname to the current tree
+ * concatenate the dirname to the current tree
*/
strcat(root, "/");
strcat(root, dirp->d_name);
} else
*errp = *errp ? *errp : errno;
- /* recover path to our cur tree by truncating it to
- * its original len
+ /* recover path to our cur tree by truncating it to
+ * its original len
*/
*cp = 0;
}
Log("Warning: Lost ref on ihandle dev %d vid %d ino %" AFS_INT64_FMT "\n",
th->ih_dev, th->ih_vid, (afs_int64)th->ih_ino);
IH_RELEASE(th);
-
+
/* If we're less than 0, someone presumably unlinked;
don't bother setting count to 0, but we need to drop a lock */
if (namei_SetLinkCount(fdP, ino, 0, 1) < 0) {
afs_int32 code;
namei_t nameLink;
namei_t nameTarget;
-
+
/* Convert handle to file name. */
namei_HandleToName(&nameLink, hLink);
namei_HandleToName(&nameTarget, hTarget);
-
+
unlink(nameLink.n_path);
code = link(nameTarget.n_path, nameLink.n_path);
return code;
namei_t name;
FdHandle_t *fdP;
struct afs_stat tstat;
-
+
namei_HandleToName(&name, h);
- if (afs_stat(name.n_path, &tstat) < 0)
+ if (afs_stat(name.n_path, &tstat) < 0)
return EIO;
if (tstat.st_nlink > 1) { /* do a copy on write */
char path[259];
char *buf;
afs_size_t size;
ssize_t tlen;
-
+
fdP = IH_OPEN(h);
if (!fdP)
return EIO;
FDH_SEEK(fdP, 0, 0);
while (size) {
tlen = size > 8192 ? 8192 : size;
- if (FDH_READ(fdP, buf, tlen) != tlen)
+ if (FDH_READ(fdP, buf, tlen) != tlen)
break;
- if (write(fd, buf, tlen) != tlen)
+ if (write(fd, buf, tlen) != tlen)
break;
size -= tlen;
}
*
* Using this information we can see that a layout of 256 directories, each
* with 512 subdirectories and each of those having 512 files gives us
- * 256*512*512 = 67108864 AFS files and directories.
+ * 256*512*512 = 67108864 AFS files and directories.
*
* The volume, vnode, uniquifier and data version, as well as the tag
- * are required, either for finding the file or for salvaging. It's best to
+ * are required, either for finding the file or for salvaging. It's best to
* restrict the name to something that can be mapped into 64 bits so the
* "Inode" is easily comparable (using "==") to other "Inodes". The tag
* is used to distinguish between different versions of the same file
* which are currently in the RW and clones of a volume. See "Link Table
- * Organization" below for more information on the tag. The tag is
- * required in the name of the file to ensure a unique name.
+ * Organization" below for more information on the tag. The tag is
+ * required in the name of the file to ensure a unique name.
*
* We can store data in the uid, gid and mode bits of the files, provided
* the directories have root only access. This gives us 15 bits for each
* of uid and gid (GNU chown considers 65535 to mean "don't change").
- * There are 9 available mode bits. Adn we need to store a total of
+ * There are 9 available mode bits. Adn we need to store a total of
* 32 (volume id) + 26 (vnode) + 32 (uniquifier) + 32 (data-version) + 3 (tag)
- * or 131 bits somewhere.
+ * or 131 bits somewhere.
*
* The format of a file name for a regular file is:
* /vicepX/AFSIDat/V1/V2/AA/BB/<tag><uniq><vno>
* should be formed so that the leading characters are different as quickly
* as possible, leading to faster discards of incorrect matches in the
* lookup code.
- *
+ *
*/
if (rc != sizeof(row))
goto bad_getLinkByte;
}
-
+
return (int)((row >> index) & NAMEI_TAGMASK);
bad_getLinkByte:
}
int
-namei_GetLinkCount(FdHandle_t * h, Inode ino, int lockit)
+namei_GetLinkCount(FdHandle_t * h, Inode ino, int lockit)
{
return namei_GetLinkCount2(h, ino, lockit, 0, 1);
}
/* WriteInodeInfo
*
- * Write the inode data to the results file.
+ * Write the inode data to the results file.
*
* Returns -2 on error, 0 on success.
*
* -2 - not enough space on partition, salvager has error message for this.
*
* This code optimizes single volume salvages by just looking at that one
- * volume's directory.
+ * volume's directory.
*
* If the resultFile is NULL, then don't call the write routine.
*/
int
ListViceInodes(char *devname, char *mountedOn, FILE *inodeFile,
int (*judgeInode) (struct ViceInodeInfo * info, afs_uint32 vid, void *rock),
- afs_uint32 singleVolumeNumber, int *forcep, int forceR, char *wpath,
+ afs_uint32 singleVolumeNumber, int *forcep, int forceR, char *wpath,
void *rock)
{
int ninodes;
int64_to_flipbase64(check, info->inodeNumber);
if (strcmp(name, check))
return -1;
-
+
GetOGMFromStat(&status, &parm, &tag);
if ((info->inodeNumber & NAMEI_INODESPECIAL) == NAMEI_INODESPECIAL) {
/* p1 - vid, p2 - -1, p3 - type, p4 - rwvid */
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct ViceInodeInfo * info,
char *dir, char *file), FILE * fp,
int (*judge_fun) (struct ViceInodeInfo * info,
- afs_uint32 vid, void *rock),
+ afs_uint32 vid, void *rock),
afs_uint32 singleVolumeNumber, void *rock);
int ListViceInodes(char *devname, char *mountedOn, FILE *inodeFile,
- int (*judgeInode) (struct ViceInodeInfo * info, afs_uint32 vid,
+ int (*judgeInode) (struct ViceInodeInfo * info, afs_uint32 vid,
void *rock),
afs_uint32 singleVolumeNumber, int *forcep, int forceR,
char *wpath, void *rock);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
int nt_SetLinkCount(FdHandle_t * h, Inode ino, int count, int locked);
-/* nt_DevToDrive
+/* nt_DevToDrive
* converts a device number (2-25) into a drive letter name.
*
* Arguments:
* The data for each volume is in a separate directory. The name of the
* volume is of the form: Vol_NNNNNN.data, where NNNNNN is a base 32
* representation of the RW volume ID (even where the RO is the only volume
- * on the partition). Below that are separate subdirectories for the
+ * on the partition). Below that are separate subdirectories for the
* AFS directories and special files. There are also 16 directories for files,
* hashed on the low 5 bits (recall bit0 is always 0) of the vnode number.
* These directories are named:
if (!SetFilePointer(h->fd_fd, (LONG) offset, NULL, FILE_BEGIN))
goto bad_getLinkByte;
- if (!ReadFile(h->fd_fd, (void *)&row, 2, &bytesRead, NULL))
+ if (!ReadFile(h->fd_fd, (void *)&row, 2, &bytesRead, NULL))
goto bad_getLinkByte;
-
- if (bytesRead == 0 && fixup) {
+
+ if (bytesRead == 0 && fixup) {
LARGE_INTEGER size;
if (!GetFileSizeEx(h->fd_fd, &size) || size.QuadPart >= offset+sizeof(row))
row |= 1<<index;
goto rewrite;
}
-
+
return (int)((row >> index) & NT_TAGMASK);
bad_getLinkByte:
}
void
-nt_SetNonZLC(FdHandle_t * h, Inode ino)
+nt_SetNonZLC(FdHandle_t * h, Inode ino)
{
(void)nt_GetLinkCountInternal(h, ino, 0, 1);
}
/* WriteInodeInfo
*
- * Write the inode data to the results file.
+ * Write the inode data to the results file.
*
* Returns -2 on error, 0 on success.
*
* -2 - not enough space on partition, salvager has error message for this.
*
* This code optimizes single volume salvages by just looking at that one
- * volume's directory.
+ * volume's directory.
*
* If the inodeFile is NULL, then don't call the write routine.
*/
int
ListViceInodes(char *devname, char *mountedOn, FILE *inodeFile,
int (*judgeInode) (struct ViceInodeInfo * info, afs_uint32 vid, void *rock),
- afs_uint32 singleVolumeNumber, int *forcep, int forceR, char *wpath,
+ afs_uint32 singleVolumeNumber, int *forcep, int forceR, char *wpath,
void *rock)
{
int ninodes;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Inode operations */
extern Inode nt_MakeSpecIno(int type);
-extern Inode nt_icreate(IHandle_t * h, char *p, afs_uint32 p1, afs_uint32 p2,
+extern Inode nt_icreate(IHandle_t * h, char *p, afs_uint32 p1, afs_uint32 p2,
afs_uint32 p3, afs_uint32 p4);
extern FD_t nt_iopen(IHandle_t * h);
extern int nt_irelease(IHandle_t * h);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
#include <afs/afsutil.h>
-
+
#include "nfs.h"
#include "lwp.h"
#include "lock.h"
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
|| (strncmp(mnt.mnt_mntopts, "ro,ignore", 9) == 0))
continue;
-
+
/* If we're going to always attach this partition, do it later. */
if (VIsAlwaysAttach(mnt.mnt_mountp))
continue;
* @internal volume package internal use only
*/
-struct DiskPartition64 *
+struct DiskPartition64 *
VGetPartitionById_r(afs_int32 id, int abortp)
{
struct DiskPartition64 *dp = NULL;
return dp;
}
-static struct DiskPartition64 *
+static struct DiskPartition64 *
VLookupPartition_r(char * path)
{
afs_int32 id = volutil_GetPartitionID(path);
return DiskPartitionTable[id];
}
-static void
+static void
AddPartitionToTable_r(struct DiskPartition64 *dp)
{
assert(dp->index >= 0 && dp->index <= VOLMAXPARTS);
}
#if 0
-static void
+static void
DeletePartitionFromTable_r(struct DiskPartition64 *dp)
{
assert(dp->index >= 0 && dp->index <= VOLMAXPARTS);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
};
#define PART_DONTUPDATE 1
-#define PART_DUPLICATE 2 /* NT - used if we find more than one partition
+#define PART_DUPLICATE 2 /* NT - used if we find more than one partition
* using the same drive. Will be dumped before
* all partitions attached.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#if 0
static void PurgeIndex(Volume * vp, VnodeClass class);
static void PurgeHeader(Volume * vp);
-#endif
+#endif
static void PurgeIndex_r(Volume * vp, VnodeClass class);
static void PurgeHeader_r(Volume * vp);
/* No lock needed. Only the volserver will call this, and only one transaction
- * can have a given volume (volid/partition pair) in use at a time
+ * can have a given volume (volid/partition pair) in use at a time
*/
void
VPurgeVolume(Error * ec, Volume * vp)
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2006-2007, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
-/*
+/*
* demand attach fs
* online salvager daemon
*/
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
"trying to continue anyway\n");
}
SALVSYNC_clientInit();
-
+
code = SALVSYNC_SalvageVolume(vid, pname, SALVSYNC_SALVAGE, SALVSYNC_OPERATOR, 0, NULL);
if (code != SYNC_OK) {
goto sync_error;
* VInitVolumePackage2 (called below) makes sure that a file server or
* other volume utilities don't interfere with the salvage.
*/
-
+
/* even demand attach online salvager
* still needs this because we don't want
* a stand-alone salvager to conflict with
/* start up the reaper and log cleaner threads */
assert(pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED) == 0);
- assert(pthread_create(&tid,
- &attrs,
+ assert(pthread_create(&tid,
+ &attrs,
&SalvageChildReaperThread,
NULL) == 0);
- assert(pthread_create(&tid,
- &attrs,
+ assert(pthread_create(&tid,
+ &attrs,
&SalvageLogCleanupThread,
NULL) == 0);
assert(pthread_create(&tid,
child_slot[slot] = pid;
node->pid = pid;
VOL_UNLOCK;
-
+
assert(pthread_mutex_lock(&worker_lock) == 0);
current_workers++;
-
+
/* let the reaper thread know another worker was spawned */
assert(pthread_cond_broadcast(&worker_cv) == 0);
-
+
/* if we're overquota, wait for the reaper */
while (current_workers >= Parallel) {
assert(pthread_cond_wait(&worker_cv, &worker_lock) == 0);
* another thread may have held the lock on the FILE
* structure when fork was called! */
- afs_snprintf(childLog, sizeof(childLog), "%s.%d",
+ afs_snprintf(childLog, sizeof(childLog), "%s.%d",
AFSDIR_SERVER_SLVGLOG_FILEPATH, getpid());
logFile = afs_fopen(childLog, "a");
Log("salvageServer: invalid volume id specified; salvage aborted\n");
return 1;
}
-
+
partP = VGetPartition(node->command.sop.partName, 0);
if (!partP) {
- Log("salvageServer: Unknown or unmounted partition %s; salvage aborted\n",
+ Log("salvageServer: Unknown or unmounted partition %s; salvage aborted\n",
node->command.sop.partName);
return 1;
}
SalvageLogCleanup(cleanup->pid);
free(cleanup);
assert(pthread_mutex_lock(&worker_lock) == 0);
- }
+ }
}
assert(pthread_mutex_unlock(&worker_lock) == 0);
char fn[AFSDIR_PATH_MAX];
static char buf[LOG_XFER_BUF_SIZE];
- afs_snprintf(fn, sizeof(fn), "%s.%d",
+ afs_snprintf(fn, sizeof(fn), "%s.%d",
AFSDIR_SERVER_SLVGLOG_FILEPATH, pid);
-
+
pidlog = open(fn, O_RDONLY);
unlink(fn);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
char pname[100], *temp;
afs_int32 seenpart = 0, seenvol = 0, vid = 0;
ProgramType pt;
-
+
#ifdef FAST_RESTART
afs_int32 seenany = 0;
#endif
-
+
VolumePackageOptions opts;
struct DiskPartition64 *partP;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2006-2008, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
extern int VInit;
extern pthread_mutex_t vol_salvsync_mutex;
-static SYNC_client_state salvsync_client_state =
+static SYNC_client_state salvsync_client_state =
{ -1, /* file descriptor */
SALVSYNC_ENDPOINT_DECL, /* server endpoint */
SALVSYNC_PROTO_VERSION, /* protocol version */
}
afs_int32
-SALVSYNC_SalvageVolume(VolumeId volume, char *partName, int command, int reason,
+SALVSYNC_SalvageVolume(VolumeId volume, char *partName, int command, int reason,
afs_uint32 prio, SYNC_response * res_in)
{
SYNC_command com;
}
afs_int32
-SALVSYNC_LinkVolume(VolumeId parent,
+SALVSYNC_LinkVolume(VolumeId parent,
VolumeId clone,
char * partName,
SYNC_response * res_in)
/*
* Copyright 2006-2008, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
static void DeleteFromPendingQueue(struct SalvageQueueNode * node);
static struct SalvageQueueNode * LookupPendingCommandByPid(int pid);
static void UpdateCommandPrio(struct SalvageQueueNode * node);
-static void HandlePrio(struct SalvageQueueNode * clone,
+static void HandlePrio(struct SalvageQueueNode * clone,
struct SalvageQueueNode * parent,
afs_uint32 new_prio);
static int LinkNode(struct SalvageQueueNode * parent,
struct SalvageQueueNode * clone);
-static struct SalvageQueueNode * LookupNode(VolumeId vid, char * partName,
+static struct SalvageQueueNode * LookupNode(VolumeId vid, char * partName,
struct SalvageQueueNode ** parent);
static struct SalvageQueueNode * LookupNodeByCommand(SALVSYNC_command_hdr * qry,
struct SalvageQueueNode ** parent);
/**
* salvsync server socket handle.
*/
-static SYNC_server_state_t salvsync_server_state =
+static SYNC_server_state_t salvsync_server_state =
{ -1, /* file descriptor */
SALVSYNC_ENDPOINT_DECL, /* server endpoint */
SALVSYNC_PROTO_VERSION, /* protocol version */
memset(&scom, 0, sizeof(scom));
memset(&sres, 0, sizeof(sres));
memset(&sres_hdr, 0, sizeof(sres_hdr));
-
+
com.payload.buf = (void *)buf;
com.payload.len = SYNC_PROTO_MAX_LEN;
res.payload.buf = (void *) &sres_hdr;
*
* @internal
*
- * @post the volume is enqueued in the to-be-salvaged queue.
- * if the volume was already in the salvage queue, its
- * priority (and thus its location in the queue) are
+ * @post the volume is enqueued in the to-be-salvaged queue.
+ * if the volume was already in the salvage queue, its
+ * priority (and thus its location in the queue) are
* updated.
*/
static afs_int32
memcpy(&clone->command.com, com->hdr, sizeof(SYNC_command_hdr));
memcpy(&clone->command.sop, com->sop, sizeof(SALVSYNC_command_hdr));
- /*
+ /*
* make sure volgroup parent partition path is kept coherent
*
* If we ever want to support non-COW clones on a machine holding
res->hdr->flags |= SALVSYNC_FLAG_VOL_STATS_VALID;
res->sop->prio = node->command.sop.prio;
res->sop->state = node->state;
- if ((node->type == SALVSYNC_VOLGROUP_PARENT) &&
+ if ((node->type == SALVSYNC_VOLGROUP_PARENT) &&
(node->state == SALVSYNC_STATE_QUEUED)) {
DeleteFromSalvageQueue(node);
}
int code = 0;
struct SalvageQueueNode * node;
- *node_out = node = (struct SalvageQueueNode *)
+ *node_out = node = (struct SalvageQueueNode *)
malloc(sizeof(struct SalvageQueueNode));
if (node == NULL) {
code = 1;
}
static void
-HandlePrio(struct SalvageQueueNode * clone,
+HandlePrio(struct SalvageQueueNode * clone,
struct SalvageQueueNode * node,
afs_uint32 new_prio)
{
struct SalvageQueueNode * np, * nnp;
for (queue_Scan(&pendingQueue, np, nnp, SalvageQueueNode)) {
- if ((np->command.sop.volume == qry->volume) &&
+ if ((np->command.sop.volume == qry->volume) &&
!strncmp(np->command.sop.partName, qry->partName,
sizeof(qry->partName)))
break;
/* this will need to be rearchitected if we ever want more than one thread
* to wait for new salvage nodes */
-struct SalvageQueueNode *
+struct SalvageQueueNode *
SALVSYNC_getWork(void)
{
int i;
VOL_CV_WAIT(&salvageQueue.cv);
}
- /*
+ /*
* short circuit for simple case where only one partition has
* scheduled salvages
*/
}
- /*
+ /*
* ok, more than one partition has scheduled salvages.
- * now search for partitions with scheduled salvages, but no pending salvages.
+ * now search for partitions with scheduled salvages, but no pending salvages.
*/
dp = VGetPartitionById_r(next_part_sched, 0);
if (!dp) {
}
fdp = dp;
- for (i=0 ;
- !i || dp != fdp ;
+ for (i=0 ;
+ !i || dp != fdp ;
dp = (dp->next) ? dp->next : DiskPartitionList, i++ ) {
if (!partition_salvaging[dp->index] && salvageQueue.len[dp->index]) {
node = queue_First(&salvageQueue.part[dp->index], SalvageQueueNode);
*/
dp = fdp;
- for (i=0 ;
- !i || dp != fdp ;
+ for (i=0 ;
+ !i || dp != fdp ;
dp = (dp->next) ? dp->next : DiskPartitionList, i++ ) {
if (salvageQueue.len[dp->index]) {
node = queue_First(&salvageQueue.part[dp->index], SalvageQueueNode);
static int
ChildFailed(int status)
{
- return (WCOREDUMP(status) ||
- WIFSIGNALED(status) ||
- ((WEXITSTATUS(status) != 0) &&
+ return (WCOREDUMP(status) ||
+ WIFSIGNALED(status) ||
+ ((WEXITSTATUS(status) != 0) &&
(WEXITSTATUS(status) != SALSRV_EXIT_VOLGROUP_LINK)));
}
/*
* Copyright 2006-2010, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#define SALVSYNC_PROTO_VERSION SALVSYNC_PROTO_VERSION_V3
-/**
+/**
* SALVSYNC protocol command codes.
*/
typedef enum {
/* SALVSYNC flags */
#define SALVSYNC_FLAG_VOL_STATS_VALID SYNC_FLAG_CODE_DECL(0) /* volume stats in response are valid */
-/**
+/**
* SALVSYNC command state.
*/
typedef enum {
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (vnp == vcp->lruHead)
vcp->lruHead = vcp->lruHead->lruNext;
- if ((vnp == vcp->lruHead) ||
+ if ((vnp == vcp->lruHead) ||
(vcp->lruHead == NULL))
Abort("DeleteFromVnLRU: lru chain addled!\n");
* state is set to VN_STATE_INVALID.
* inode handle is released.
*
- * @note we traverse backwards along the lru circlist. It shouldn't
- * be necessary to specify that nUsers == 0 since if it is in the list,
- * nUsers should be 0. Things shouldn't be in lruq unless no one is
+ * @note we traverse backwards along the lru circlist. It shouldn't
+ * be necessary to specify that nUsers == 0 since if it is in the list,
+ * nUsers should be 0. Things shouldn't be in lruq unless no one is
* using them.
*
* @warning DAFS: VOL_LOCK is dropped while doing inode handle release
#endif
VNLog(1, 2, Vn_id(vnp), (intptr_t)vnp, 0, 0);
- /*
+ /*
* it's going to be overwritten soon enough.
- * remove from LRU, delete hash entry, and
+ * remove from LRU, delete hash entry, and
* disassociate from old parent volume before
* we have a chance to drop the vol glock
*/
* - ihandle package lock contention
* - closing file descriptor(s) associated with ih
*
- * Hance, we perform outside of the volume package lock in order to
+ * Hance, we perform outside of the volume package lock in order to
* reduce the probability of contention.
*/
IH_RELEASE(vnp->handle);
newHash = VNODE_HASH(vp, vnodeId);
for (vnp = VnodeHashTable[newHash];
- (vnp &&
- ((Vn_id(vnp) != vnodeId) ||
+ (vnp &&
+ ((Vn_id(vnp) != vnodeId) ||
(Vn_volume(vnp) != vp) ||
(vp->cacheCheck != Vn_cacheCheck(vnp))));
vnp = vnp->hashNext);
*
* if this becomes a bottleneck, there are ways to
* improve parallelism for this code path
- * -- tkeiser 11/28/2007
+ * -- tkeiser 11/28/2007
*/
VCreateReservation_r(vp);
VWaitExclusiveState_r(vp);
error_encountered:
- /*
+ /*
* close the file handle
* acquire VOL_LOCK
* invalidate the vnode
* @internal vnode package internal use only
*/
static void
-VnLoad(Error * ec, Volume * vp, Vnode * vnp,
+VnLoad(Error * ec, Volume * vp, Vnode * vnp,
struct VnodeClassInfo * vcp, VnodeClass class)
{
/* vnode not cached */
Log("VnLoad: Couldn't read vnode %u, volume %u (%s); volume needs salvage\n", Vn_id(vnp), V_id(vp), V_name(vp));
} else {
/* vnode is not allocated */
- if (LogLevel >= 5)
- Log("VnLoad: Couldn't read vnode %u, volume %u (%s); read %d bytes, errno %d\n",
+ if (LogLevel >= 5)
+ Log("VnLoad: Couldn't read vnode %u, volume %u (%s); read %d bytes, errno %d\n",
Vn_id(vnp), V_id(vp), V_name(vp), (int)nBytes, errno);
*ec = VIO;
dosalv = 0;
* @internal vnode package internal use only
*/
static void
-VnStore(Error * ec, Volume * vp, Vnode * vnp,
+VnStore(Error * ec, Volume * vp, Vnode * vnp,
struct VnodeClassInfo * vcp, VnodeClass class)
{
ssize_t nBytes;
VnChangeState_r(vnp, vn_state_save);
#endif
return;
-
+
error_encountered:
#ifdef AFS_DEMAND_ATTACH_FS
/* XXX instead of dumping core, let's try to request a salvage
return 0;
}
-/**
+/**
* initial size of ihandle pointer vector.
*
* @see VInvalidateVnodesByVolume_r
if (ih_vec == NULL)
return ENOMEM;
- /*
- * Traverse the volume's vnode list. Pull all the ihandles out into a
+ /*
+ * Traverse the volume's vnode list. Pull all the ihandles out into a
* thread-private array for later asynchronous processing.
*/
#ifdef AFS_DEMAND_ATTACH_FS
ih_vec = ih_vec_new;
#ifdef AFS_DEMAND_ATTACH_FS
/*
- * Theoretically, the volume's VVn list should not change
+ * Theoretically, the volume's VVn list should not change
* because the volume is in an exclusive state. For the
* sake of safety, we will restart the traversal from the
* the beginning (which is not expensive because we're
* during this exclusive operation. This is due to the fact that we are
* generally called during the refcount 1->0 transition.
*
- * @todo we should handle failures in VInvalidateVnodesByVolume_r more
+ * @todo we should handle failures in VInvalidateVnodesByVolume_r more
* gracefully.
*
* @see VInvalidateVnodesByVolume_r
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2007-2008, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
if (--Vn_refcount(vnp) == 0) {
AddToVnLRU(Vn_class(vnp), vnp);
- /* If caching is turned off,
+ /* If caching is turned off,
* disassociate vnode cache entry from volume object */
if (!TrustVnodeCacheEntry) {
DeleteFromVVnList(vnp);
case VN_STATE_EXCLUSIVE:
case VN_STATE_STORE:
return 1;
- default:
+ default:
return 0;
}
}
static_inline int
VnIsValidState(VnState state)
{
- if ((state >= 0) &&
+ if ((state >= 0) &&
(state < VN_STATE_COUNT)) {
return 1;
}
/*
* Copyright 2004, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
System: VICE-TWO
Module: vol-info.c
Institution: The Information Technology Center, Carnegie-Mellon University
-
+
*/
#include <afsconfig.h>
#include "viceinode.h"
#include <afs/afssyscalls.h>
#include <afs/afsutil.h>
-
+
#ifdef _AIX
#include <time.h>
#endif
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
Logs missing inode numbers.
2.3 features:
- Increments directory version number by 200 (rather than by 1) when it is salvaged, in order to prevent problems due to the fact that a version number can be promised to a workstation before it is written to disk. If the server crashes, it may have an older version. Salvaging it could bring the version number up to the same version the workstation believed it already had a call back on.
+ Increments directory version number by 200 (rather than by 1) when it is salvaged, in order to prevent problems due to the fact that a version number can be promised to a workstation before it is written to disk. If the server crashes, it may have an older version. Salvaging it could bring the version number up to the same version the workstation believed it already had a call back on.
2.4 features:
Locks the file /vice/vol/salvage.lock before starting. Aborts if it can't acquire the lock.
{
/*
* The root inode is not a fixed value in XFS partitions. So we need to
- * see if the partition is in the list of mounted partitions. This only
+ * see if the partition is in the list of mounted partitions. This only
* affects the SalvageFileSys path, so we check there.
*/
return (status->st_ino == ROOTINODE);
}
if (thisjob) {
- /* Check to see if thisjob is for a disk that we are already
+ /* Check to see if thisjob is for a disk that we are already
* salvaging. If it is, link it in as the next job to do. The
- * jobs array has 1 entry per disk being salvages. numjobs is
- * the total number of disks currently being salvaged. In
+ * jobs array has 1 entry per disk being salvages. numjobs is
+ * the total number of disks currently being salvaged. In
* order to keep thejobs array compact, when a disk is
- * completed, the hightest element in the jobs array is moved
+ * completed, the hightest element in the jobs array is moved
* down to now open slot.
*/
for (j = 0; j < numjobs; j++) {
jobs[j] = jobs[j]->nextjob; /* Step to next part on same disk */
free(oldjob); /* free the old job */
- /* If there is another partition on the disk to salvage, then
+ /* If there is another partition on the disk to salvage, then
* say we will start it (startjob). If not, then put thisjob there
* and say we will start it.
*/
/*
- * Remove any leftover /vicepa/salvage.inodes.* or /vicepa/salvage.temp.*
- * files
+ * Remove any leftover /vicepa/salvage.inodes.* or /vicepa/salvage.temp.*
+ * files
*/
{
DIR *dirp;
* the last try looking at it; avoid AskOffline'ing the same vol
* multiple times */
- if (singleVolumeNumber
+ if (singleVolumeNumber
&& summary.header.id != singleVolumeNumber) {
/* don't offline singleVolumeNumber; we already did that
* earlier */
/*
* Because of the possibility of the uniquifier overflows (> 4M)
* we compare them modulo the low 22-bits; we shouldn't worry
- * about mismatching since they shouldn't to many old
+ * about mismatching since they shouldn't to many old
* uniquifiers of the same vnode...
*/
if (IUnique(vu) != IUnique(iu)) {
memset(vnode, 0, vcp->diskSize);
vnodeChanged = 1;
} else {
- /* Should not reach here becuase we checked for
+ /* Should not reach here becuase we checked for
* (inodeNumber == 0) above. And where we zero the vnode,
* we also goto vnodeDone.
*/
}
/*
- * This function should either successfully create a new dir, or give up
- * and leave things the way they were. In particular, if it fails to write
- * the new dir properly, it should return w/o changing the reference to the
+ * This function should either successfully create a new dir, or give up
+ * and leave things the way they were. In particular, if it fails to write
+ * the new dir properly, it should return w/o changing the reference to the
* old dir.
*/
void
assert(VALID_INO(newinode));
SetSalvageDirHandle(&newdir, dir->rwVid, fileSysDevice, newinode);
- /* Assign . and .. vnode numbers from dir and vnode.parent.
+ /* Assign . and .. vnode numbers from dir and vnode.parent.
* The uniquifier for . is in the vnode.
- * The uniquifier for .. might be set to a bogus value of 1 and
+ * The uniquifier for .. might be set to a bogus value of 1 and
* the salvager will later clean it up.
*/
if (vnode.parent && (vnodeEssence = CheckVnodeNumber(vnode.parent))) {
/* make sure old directory file is really closed */
fdP = IH_OPEN(dir->dirHandle.dirh_handle);
FDH_REALLYCLOSE(fdP);
-
+
code = IH_DEC(dir->ds_linkH, oldinode, dir->rwVid);
assert(code == 0);
dir->dirHandle = newdir;
}
#ifdef AFS_AIX_ENV
#ifndef AFS_NAMEI_ENV
- /* On AIX machines, don't allow entries to point to inode 0. That is a special
+ /* On AIX machines, don't allow entries to point to inode 0. That is a special
* mount inode for the partition. If this inode were deleted, it would crash
* the machine.
*/
if (!vnodeEssence->unique
&& ((strcmp(name, "..") == 0) || (strcmp(name, ".") == 0))) {
/* This is an orphaned directory. Don't delete the . or ..
- * entry. Otherwise, it will get created in the next
+ * entry. Otherwise, it will get created in the next
* salvage and deleted again here. So Just skip it.
*/
return 0;
IH_RELEASE(ihP);
return 0;
}
-
+
if (size > 1024)
size = 1024;
nBytes = FDH_READ(fdP, buf, size);
}
/* The directory entry points to the vnode. Check to see if the
- * vnode points back to the directory. If not, then let the
- * directory claim it (else it might end up orphaned). Vnodes
+ * vnode points back to the directory. If not, then let the
+ * directory claim it (else it might end up orphaned). Vnodes
* already claimed by another directory are deleted from this
* directory: hardlinks to the same vnode are not allowed
* from different directories.
LFVnode = rootdir.vnodeNumber; /* Lost+Found vnode number */
LFUnique = rootdir.unique; /* Lost+Found uniquifier */
- /* Update this orphaned vnode's info. Its parent info and
+ /* Update this orphaned vnode's info. Its parent info and
* link count (do for orphaned directories and files).
*/
vep->parent = LFVnode; /* Parent is the root dir */
vep->claimed = 1;
vep->count--; /* Inc link count (root dir will pt to it) */
- /* If this orphaned vnode is a directory, change '..'.
+ /* If this orphaned vnode is a directory, change '..'.
* The name of the orphaned dir/file is unknown, so we
* build a unique name. No need to CopyOnWrite the directory
* since it is not connected to tree in BK or RO volume and
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Forward declarations */
static Volume *attach2(Error * ec, VolId volumeId, char *path,
- struct DiskPartition64 *partp, Volume * vp,
+ struct DiskPartition64 *partp, Volume * vp,
int isbusy, int mode);
static void ReallyFreeVolume(Volume * vp);
#ifdef AFS_DEMAND_ATTACH_FS
/*
* when possible, don't just reorder single elements, but reorder
* entire chains of elements at once. a chain of elements that
- * exceed the element previous to the pivot by at least CHAIN_THRESH
+ * exceed the element previous to the pivot by at least CHAIN_THRESH
* accesses are moved in front of the chain whose elements have at
* least CHAIN_THRESH less accesses than the pivot element
*/
#endif /* AFS_PTHREAD_ENV */
#ifndef AFS_DEMAND_ATTACH_FS
-static int VAttachVolumesByPartition(struct DiskPartition64 *diskP,
+static int VAttachVolumesByPartition(struct DiskPartition64 *diskP,
int * nAttached, int * nUnattached);
#endif /* AFS_DEMAND_ATTACH_FS */
#endif /* AFS_DEMAND_ATTACH_FS */
-struct Lock vol_listLock; /* Lock obtained when listing volumes:
- * prevents a volume from being missed
- * if the volume is attached during a
+struct Lock vol_listLock; /* Lock obtained when listing volumes:
+ * prevents a volume from being missed
+ * if the volume is attached during a
* list volumes */
assert(pthread_mutex_init(&vol_salvsync_mutex, NULL) == 0);
#endif /* AFS_DEMAND_ATTACH_FS */
- /* Ok, we have done enough initialization that fileserver can
- * start accepting calls, even though the volumes may not be
+ /* Ok, we have done enough initialization that fileserver can
+ * start accepting calls, even though the volumes may not be
* available just yet.
*/
VInit = 1;
for (params.n_parts=0, diskP = DiskPartitionList;
diskP; diskP = diskP->next, params.n_parts++);
- Log("VShutdown: shutting down on-line volumes on %d partition%s...\n",
+ Log("VShutdown: shutting down on-line volumes on %d partition%s...\n",
params.n_parts, params.n_parts > 1 ? "s" : "");
if (vol_attach_threads > 1) {
}
Log("VShutdown: partition %s has %d volumes with attached headers\n",
VPartitionPath(diskP), count);
-
+
/* build up the pass 0 shutdown work queue */
dpq = (struct diskpartition_queue_t *) malloc(sizeof(struct diskpartition_queue_t));
(&tid, &attrs, &VShutdownThread,
¶ms) == 0);
}
-
+
/* wait for all the pass 0 shutdowns to complete */
while (params.n_threads_complete < params.n_threads) {
assert(pthread_cond_wait(¶ms.master_cv, ¶ms.lock) == 0);
/* run the parallel shutdown scheduler. it will drop the glock internally */
ShutdownController(¶ms);
-
+
/* wait for all the workers to finish pass 3 and terminate */
while (params.pass < 4) {
VOL_CV_WAIT(¶ms.cv);
}
-
+
assert(pthread_attr_destroy(&attrs) == 0);
assert(pthread_cond_destroy(¶ms.cv) == 0);
assert(pthread_cond_destroy(¶ms.master_cv) == 0);
if (LogLevel >= 5)
Log("VShutdown: Attempting to take volume %u offline.\n",
vp->hashid);
-
+
/* next, take the volume offline (drops reference count) */
VOffline_r(vp, "File server was shut down");
}
for (diskP = DiskPartitionList; diskP; diskP=diskP->next) {
id = diskP->index;
Log("ShutdownController: part[%d] : (len=%d, thread_target=%d, done_pass=%d, pass_head=%p)\n",
- id,
+ id,
diskP->vol_list.len,
- shadow.part_thread_target[id],
- shadow.part_done_pass[id],
+ shadow.part_thread_target[id],
+ shadow.part_done_pass[id],
shadow.part_pass_head[id]);
}
/* create the shutdown thread work schedule.
* this scheduler tries to implement fairness
- * by allocating at least 1 thread to each
+ * by allocating at least 1 thread to each
* partition with volumes to be shutdown,
* and then it attempts to allocate remaining
* threads based upon the amount of work left
for (diskP = DiskPartitionList; diskP; diskP = diskP->next) {
sum += diskP->vol_list.len;
}
-
+
params->schedule_version++;
params->vol_remaining = sum;
/* compute the residues */
for (diskP = DiskPartitionList; diskP; diskP = diskP->next) {
id = diskP->index;
- part_residue[id] = diskP->vol_list.len -
+ part_residue[id] = diskP->vol_list.len -
(params->part_thread_target[id] * thr_workload);
}
break;
}
}
-
+
if (!found) {
- /* hmm. for some reason the controller thread couldn't find anything for
+ /* hmm. for some reason the controller thread couldn't find anything for
* us to do. let's see if there's anything we can do */
for (diskP = DiskPartitionList; diskP; diskP = diskP->next) {
id = diskP->index;
}
}
}
-
+
/* do work on this partition until either the controller
* creates a new schedule, or we run out of things to do
* on this partition */
}
pass = params->pass;
}
-
+
/* for fairness */
VOL_UNLOCK;
pthread_yield();
return NULL;
}
-/* shut down all volumes on a given disk partition
+/* shut down all volumes on a given disk partition
*
* note that this function will not allow mp-fast
* shutdown of a partition */
VVByPListBeginExclusive_r(dp);
/* pick the low-hanging fruit first,
- * then do the complicated ones last
+ * then do the complicated ones last
* (has the advantage of keeping
* in-use volumes up until the bitter end) */
for (pass = 0, total=0; pass < 4; pass++) {
* 0 to only "shutdown" {pre,un}attached and error state volumes
* 1 to also shutdown attached volumes w/ volume header loaded
* 2 to also shutdown attached volumes w/o volume header loaded
- * 3 to also shutdown exclusive state volumes
+ * 3 to also shutdown exclusive state volumes
*
* caller MUST hold exclusive access on the hash chain
* because we drop vol_glock_mutex internally
- *
- * this function is reentrant for passes 1--3
- * (e.g. multiple threads can cooperate to
+ *
+ * this function is reentrant for passes 1--3
+ * (e.g. multiple threads can cooperate to
* shutdown a partition mp-fast)
*
* pass 0 is not scaleable because the volume state data is
for (queue_ScanFrom(&dp->vol_list, qp, qp, nqp, rx_queue)) {
vp = (Volume *) (((char *)qp) - offsetof(Volume, vol_list));
-
+
switch (pass) {
case 0:
if ((V_attachState(vp) != VOL_STATE_UNATTACHED) &&
VWaitExclusiveState_r(vp);
assert(VIsValidState(V_attachState(vp)));
-
+
switch(V_attachState(vp)) {
case VOL_STATE_SALVAGING:
/* Leave salvaging volumes alone. Any in-progress salvages will
default:
break;
}
-
+
VCancelReservation_r(vp);
vp = NULL;
return 0;
* Converts an on-disk representation of a volume header to
* the in-memory representation of a volume header.
*
- * Makes the assumption that AFS has *always*
+ * Makes the assumption that AFS has *always*
* zero'd the volume header file so that high parts of inode
* numbers are 0 in older (SGI EFS) volume header files.
*/
* @return volume object pointer
*
* @note A pre-attached volume will only have its partition
- * and hashid fields initialized. At first call to
+ * and hashid fields initialized. At first call to
* VGetVolume, the volume will be fully attached.
*
*/
Volume *
VPreAttachVolumeByName_r(Error * ec, char *partition, char *name)
{
- return VPreAttachVolumeById_r(ec,
+ return VPreAttachVolumeById_r(ec,
partition,
VolumeNumber(name));
}
* @internal volume package internal use only.
*/
Volume *
-VPreAttachVolumeById_r(Error * ec,
+VPreAttachVolumeById_r(Error * ec,
char * partition,
VolId volumeId)
{
* properly in this case.
*
* @note If there is already a volume object registered with
- * the same volume id, its pointer MUST be passed as
+ * the same volume id, its pointer MUST be passed as
* argument vp. Failure to do so will result in a silent
* failure to preattach.
*
* @internal volume package internal use only.
*/
-Volume *
-VPreAttachVolumeByVp_r(Error * ec,
- struct DiskPartition64 * partp,
+Volume *
+VPreAttachVolumeByVp_r(Error * ec,
+ struct DiskPartition64 * partp,
Volume * vp,
VolId vid)
{
*ec = 0;
/* check to see if pre-attach already happened */
- if (vp &&
+ if (vp &&
(V_attachState(vp) != VOL_STATE_UNATTACHED) &&
(V_attachState(vp) != VOL_STATE_DELETED) &&
(V_attachState(vp) != VOL_STATE_PREATTACHED) &&
vp = nvp;
goto done;
} else {
- /* hack to make up for VChangeState_r() decrementing
+ /* hack to make up for VChangeState_r() decrementing
* the old state counter */
VStats.state_levels[0]++;
}
#endif /* AFS_DEMAND_ATTACH_FS */
*ec = 0;
-
+
volumeId = VolumeNumber(name);
if (!(partp = VGetPartition_r(partition, 0))) {
if (vp->specialStatus == VBUSY)
isbusy = 1;
-
+
/* if it's already attached, see if we can return it */
if (V_attachState(vp) == VOL_STATE_ATTACHED) {
VGetVolumeByVp_r(ec, vp);
}
/* pre-attach volume if it hasn't been done yet */
- if (!vp ||
+ if (!vp ||
(V_attachState(vp) == VOL_STATE_UNATTACHED) ||
(V_attachState(vp) == VOL_STATE_DELETED) ||
(V_attachState(vp) == VOL_STATE_ERROR)) {
assert(vp != NULL);
- /* handle pre-attach races
+ /* handle pre-attach races
*
* multiple threads can race to pre-attach a volume,
* but we can't let them race beyond that
- *
+ *
* our solution is to let the first thread to bring
* the volume into an exclusive state win; the other
* threads just wait until it finishes bringing the
if (*ec != VSALVAGING)
#endif /* AFS_DEMAND_ATTACH_FS */
FSYNC_VolOp(volumeId, partition, FSYNC_VOL_ON, 0, NULL);
- } else
+ } else
#endif
if (programType == fileServer && vp) {
#ifdef AFS_DEMAND_ATTACH_FS
- /*
+ /*
* we can get here in cases where we don't "own"
* the volume (e.g. volume owned by a utility).
* short circuit around potential disk header races.
/* volume utility should never call AttachByVp */
assert(programType == fileServer);
-
+
volumeId = vp->hashid;
partp = vp->partition;
VolumeExternalName_r(volumeId, name, sizeof(name));
}
/* pre-attach volume if it hasn't been done yet */
- if (!vp ||
+ if (!vp ||
(V_attachState(vp) == VOL_STATE_UNATTACHED) ||
(V_attachState(vp) == VOL_STATE_DELETED) ||
(V_attachState(vp) == VOL_STATE_ERROR)) {
vp = nvp;
}
}
-
+
assert(vp != NULL);
VChangeState_r(vp, VOL_STATE_ATTACHING);
* for any reason, skip to the end. We cannot
* safely call VUpdateVolume unless we "own" it.
*/
- if (*ec ||
+ if (*ec ||
(vp == NULL) ||
(V_attachState(vp) != VOL_STATE_ATTACHED)) {
goto done;
IncUInt64(&vp->stats.hdr_loads);
VOL_UNLOCK;
#endif /* AFS_DEMAND_ATTACH_FS */
-
+
if (*ec) {
Log("VAttachVolume: Error reading diskDataHandle header for vol %lu; "
"error=%u\n", afs_printable_uint32_lu(volid), *ec);
/* try to get a volume we've previously looked up */
/* for demand attach fs, caller MUST NOT hold a ref count on vp */
-Volume *
+Volume *
VGetVolumeByVp_r(Error * ec, Volume * vp)
{
return GetVolume(ec, NULL, vp->hashid, vp, 0);
Volume *avp, * rvp = hint;
#endif
- /*
+ /*
* if VInit is zero, the volume package dynamic
* data structures have not been initialized yet,
* and we must immediately return an error
VGET_CTR_INC(V3);
IncUInt64(&VStats.hdr_gets);
-
+
#ifdef AFS_DEMAND_ATTACH_FS
/* block if someone else is performing an exclusive op on this volume */
if (rvp != vp) {
* not VolOpRunningUnknown (attach2 would have converted it to Online
* or Offline)
*/
-
+
/* only valid before/during demand attachment */
assert(!vp->pending_vol_op || vp->pending_vol_op->vol_op_state != FSSYNC_VolOpRunningUnknown);
-
+
/* deny getvolume due to running mutually exclusive vol op */
if (vp->pending_vol_op && vp->pending_vol_op->vol_op_state==FSSYNC_VolOpRunningOffline) {
- /*
+ /*
* volume cannot remain online during this volume operation.
- * notify client.
+ * notify client.
*/
if (vp->specialStatus) {
/*
#endif /* AFS_DEMAND_ATTACH_FS */
break;
}
-
+
VGET_CTR_INC(V7);
if (vp->shuttingDown) {
VGET_CTR_INC(V8);
*
* @post needsSalvaged flag is set.
* for DAFS, salvage is requested.
- * no further references to the volume through the volume
+ * no further references to the volume through the volume
* package will be honored.
* all file descriptor and vnode caches are invalidated.
*
* @warning this is a heavy-handed interface. it results in
- * a volume going offline regardless of the current
+ * a volume going offline regardless of the current
* reference count state.
*
* @internal volume package internal use only
while (!VIsOfflineState(V_attachState(vp))) {
/* do not give corrupted volumes to the volserver */
if (vp->salvage.requested && vp->pending_vol_op->com.programType != salvageServer) {
- *ec = 1;
+ *ec = 1;
goto error;
}
VWaitStateChange_r(vp);
}
- *ec = 0;
+ *ec = 0;
error:
VCancelReservation_r(vp);
}
VLRU_Delete_r(vp);
VChangeState_r(vp, VOL_STATE_SHUTTING_DOWN);
#else
- if (programType != fileServer)
+ if (programType != fileServer)
V_inUse(vp) = 0;
#endif /* AFS_DEMAND_ATTACH_FS */
VPutVolume_r(vp);
*/
#ifdef FSSYNC_BUILD_CLIENT
if (VCanUseFSSYNC() && notifyServer) {
- /*
- * Note: The server is not notified in the case of a bogus volume
- * explicitly to make it possible to create a volume, do a partial
- * restore, then abort the operation without ever putting the volume
- * online. This is essential in the case of a volume move operation
- * between two partitions on the same server. In that case, there
- * would be two instances of the same volume, one of them bogus,
- * which the file server would attempt to put on line
+ /*
+ * Note: The server is not notified in the case of a bogus volume
+ * explicitly to make it possible to create a volume, do a partial
+ * restore, then abort the operation without ever putting the volume
+ * online. This is essential in the case of a volume move operation
+ * between two partitions on the same server. In that case, there
+ * would be two instances of the same volume, one of them bogus,
+ * which the file server would attempt to put on line
*/
FSYNC_VolOp(volume, tpartp->name, useDone, 0, NULL);
/* XXX this code path is only hit by volume utilities, thus
/* demand attach fs
*
* XXX need to investigate whether we can perform
- * DFlushVolume outside of vol_glock_mutex...
+ * DFlushVolume outside of vol_glock_mutex...
*
* VCloseVnodeFiles_r drops the glock internally */
DFlushVolume(vp->hashid);
/* For both VForceOffline and VOffline, we close all relevant handles.
* For VOffline, if we re-attach the volume, the files may possible be
- * different than before.
+ * different than before.
*/
/* for demand attach, caller MUST hold a ref count on vp */
static void
if (*ec) {
Log("VUpdateVolume: error updating volume header, volume %u (%s)\n",
V_id(vp), V_name(vp));
- /* try to update on-disk header,
+ /* try to update on-disk header,
* while preventing infinite recursion */
if (!(flags & VOL_UPDATE_NOFORCEOFF)) {
VForceOffline_r(vp, VOL_FORCEOFF_NOUPDATE);
* from free()ing the Volume struct during an async i/o op */
/* register with the async volume op ref counter */
-/* VCreateReservation_r moved into inline code header because it
- * is now needed in vnode.c -- tkeiser 11/20/2007
+/* VCreateReservation_r moved into inline code header because it
+ * is now needed in vnode.c -- tkeiser 11/20/2007
*/
/**
*
* @internal volume package internal use only
*
- * @pre
+ * @pre
* @arg VOL_LOCK is held
* @arg lightweight refcount held
*
int ret = 0;
if ((vp->nUsers == 0) &&
(vp->nWaiters == 0) &&
- !(V_attachFlags(vp) & (VOL_IN_HASH |
- VOL_ON_VBYP_LIST |
+ !(V_attachFlags(vp) & (VOL_IN_HASH |
+ VOL_ON_VBYP_LIST |
VOL_IS_BUSY |
VOL_ON_VLRU))) {
ReallyFreeVolume(vp);
* @param[in] flags see flags note below
*
* @note flags:
- * VOL_SALVAGE_INVALIDATE_HEADER causes volume header cache entry
+ * VOL_SALVAGE_INVALIDATE_HEADER causes volume header cache entry
* to be invalidated.
*
* @pre VOL_LOCK is held.
code = 1;
}
if (flags & VOL_SALVAGE_INVALIDATE_HEADER) {
- /* Instead of ReleaseVolumeHeader, we do FreeVolumeHeader()
- so that the the next VAttachVolumeByVp_r() invocation
- of attach2() will pull in a cached header
- entry and fail, then load a fresh one from disk and attach
- it to the volume.
+ /* Instead of ReleaseVolumeHeader, we do FreeVolumeHeader()
+ so that the the next VAttachVolumeByVp_r() invocation
+ of attach2() will pull in a cached header
+ entry and fail, then load a fresh one from disk and attach
+ it to the volume.
*/
FreeVolumeHeader(vp);
}
*
* @note DAFS fileserver only
*
- * @note this should be called whenever a VGetVolume fails due to a
+ * @note this should be called whenever a VGetVolume fails due to a
* pending salvage request
*
* @todo should set exclusive state and drop glock around salvsync call
now = FT_ApproxTime();
/* update the salvageserver priority queue occasionally so that
- * frequently requested volumes get moved to the head of the queue
+ * frequently requested volumes get moved to the head of the queue
*/
if ((vp->salvage.scheduled) &&
(vp->stats.last_salvage_req < (now-SALVAGE_PRIO_UPDATE_INTERVAL))) {
* @retval 0 salvage scheduled successfully
* @retval 1 salvage not scheduled, or SALVSYNC/FSSYNC com error
*
- * @pre
+ * @pre
* @arg VOL_LOCK is held.
* @arg nUsers and nWaiters should be zero.
*
* to avoid fssync deadlocks
*/
if (!vp->salvage.scheduled) {
- /* if we haven't previously scheduled a salvage, do so now
+ /* if we haven't previously scheduled a salvage, do so now
*
* set the volume to an exclusive state and drop the lock
* around the SALVSYNC call
* @return operation status
* @retval 0 success
*
- * @pre
+ * @pre
* @arg VOL_LOCK is held.
* @arg client should have a live connection to the salvageserver.
*
*/
int
VDisconnectSALV_r(void)
-{
+{
return SALVSYNC_clientFinis();
}
* @retval 0 failure
* @retval 1 success
*
- * @pre
+ * @pre
* @arg VOL_LOCK is held.
* @arg client should have a live connection to the salvageserver.
*
* @retval 0 failure
* @retval 1 success
*
- * @pre
+ * @pre
* @arg VInit must equal 2.
* @arg Program Type must not be fileserver or salvager.
*
* @retval 0 failure
* @retval 1 success
*
- * @pre
+ * @pre
* @arg VInit must equal 2.
* @arg Program Type must not be fileserver or salvager.
* @arg VOL_LOCK is held.
VConnectFS_r(void)
{
int rc;
- assert((VInit == 2) &&
+ assert((VInit == 2) &&
(programType != fileServer) &&
(programType != salvager));
rc = FSYNC_clientInit();
/**
* disconnect from the fileserver SYNC service.
*
- * @pre
+ * @pre
* @arg client should have a live connection to the fileserver.
* @arg VOL_LOCK is held.
* @arg Program Type must not be fileserver or salvager.
*/
int
-VAllocBitmapEntry_r(Error * ec, Volume * vp,
+VAllocBitmapEntry_r(Error * ec, Volume * vp,
struct vnodeIndex *index, int flags)
{
int ret = 0;
* in order to speed up fileserver shutdown
*
* (1) by soft detach we mean a process very similar
- * to VOffline, except the final state of the
+ * to VOffline, except the final state of the
* Volume will be VOL_STATE_PREATTACHED, instead
* of the usual VOL_STATE_UNATTACHED
*/
* @note DAFS only
*
* @note valid option parameters are:
- * @arg @c VLRU_SET_THRESH
+ * @arg @c VLRU_SET_THRESH
* set the period of inactivity after which
* volumes are eligible for soft detachment
- * @arg @c VLRU_SET_INTERVAL
+ * @arg @c VLRU_SET_INTERVAL
* set the time interval between calls
* to the volume LRU "garbage collector"
- * @arg @c VLRU_SET_MAX
+ * @arg @c VLRU_SET_MAX
* set the max number of volumes to deallocate
* in one GC pass
*/
*
* @post VLRU scanner thread internal timing parameters are computed
*
- * @note computes internal timing parameters based upon user-modifiable
+ * @note computes internal timing parameters based upon user-modifiable
* tunable parameters.
*
* @note DAFS only
*
* @note DAFS only
*
- * @todo We should probably set volume state to something exlcusive
+ * @todo We should probably set volume state to something exlcusive
* (as @c VLRU_Add_r does) prior to dropping @c VOL_LOCK.
*
* @internal volume package internal use only.
VLRU_Wait_r(&volume_LRU.q[idx]);
} while (idx != vp->vlru.idx);
- /* now remove from the VLRU and update
+ /* now remove from the VLRU and update
* the appropriate counter */
queue_Remove(&vp->vlru);
volume_LRU.q[idx].len--;
*
* @param[in] vp pointer to volume object
* @param[in] new_idx index of VLRU queue onto which the volume will be moved
- * @param[in] append controls whether the volume will be appended or
+ * @param[in] append controls whether the volume will be appended or
* prepended to the queue. A nonzero value means it will
* be appended; zero means it will be prepended.
*
- * @pre The new (and old, if applicable) queue(s) must either be owned
+ * @pre The new (and old, if applicable) queue(s) must either be owned
* exclusively by the calling thread for asynchronous manipulation,
* or the queue(s) must be quiescent and VOL_LOCK must be held.
* Please see VLRU_BeginExclusive_r, VLRU_EndExclusive_r and VLRU_Wait_r
queue_Remove(&vp->vlru);
volume_LRU.q[vp->vlru.idx].len--;
-
+
/* put the volume back on the correct generational queue */
if (append) {
queue_Append(&volume_LRU.q[new_idx], &vp->vlru);
afs_uint32 now, min_delay, delay;
int i, min_idx, min_op, overdue, state;
- /* set t=0 for promotion cycle to be
+ /* set t=0 for promotion cycle to be
* fileserver startup */
now = FT_ApproxTime();
for (i=0; i < VLRU_GENERATIONS-1; i++) {
*
* @arg The volume has been accessed since the last promotion:
* @c (vp->stats.last_get >= vp->stats.last_promote)
- * @arg The last promotion occurred at least
+ * @arg The last promotion occurred at least
* @c volume_LRU.promotion_interval[idx] seconds ago
*
* As a performance optimization, promotions are "globbed". In other
* words, we promote arbitrarily large contiguous sublists of elements
- * as one operation.
+ * as one operation.
*
* @param[in] idx VLRU queue index to scan
*
* demotion passes */
if (salv_flag_vec &&
!(V_attachFlags(vp) & VOL_HDR_DONTSALV) &&
- demote &&
+ demote &&
(vp->updateTime < (now - SALVAGE_INTERVAL)) &&
(V_attachState(vp) == VOL_STATE_ATTACHED)) {
salv_flag_vec[salv_vec_offset++] = vp;
return ret;
}
-/* check whether volume should be made a
+/* check whether volume should be made a
* soft detach candidate */
static int
VCheckSoftDetachCandidate(Volume * vp, afs_uint32 thresh)
/* vhold drops the glock, so now we should
* check to make sure we aren't racing against
* other threads. if we are racing, offlining vp
- * would be wasteful, and block the scanner for a while
+ * would be wasteful, and block the scanner for a while
*/
- if (vp->nWaiters ||
+ if (vp->nWaiters ||
(vp->nUsers > 1) ||
(vp->shuttingDown) ||
(vp->goingOffline) ||
/* Volume Header Cache routines */
/***************************************************/
-/**
+/**
* volume header cache.
*/
struct volume_hdr_LRU_t volume_hdr_LRU;
*
* @pre VOL_LOCK held. Function has never been called before.
*
- * @post howMany cache entries are allocated, initialized, and added
+ * @post howMany cache entries are allocated, initialized, and added
* to the LRU list. Header cache statistics are initialized.
*
* @note only applicable to fileServer program type. Should only be
*
* @pre VOL_LOCK held. For DAFS, lightweight ref must be held on volume object.
*
- * @post volume header attached to volume object. if necessary, header cache
+ * @post volume header attached to volume object. if necessary, header cache
* entry on LRU is synchronized to disk. Header is removed from LRU list.
*
* @note VOL_LOCK may be dropped
hd = queue_First(&volume_hdr_LRU, volHeader);
queue_Remove(hd);
} else {
- /* LRU is empty, so allocate a new volHeader
+ /* LRU is empty, so allocate a new volHeader
* this is probably indicative of a leak, so let the user know */
hd = (struct volHeader *)calloc(1, sizeof(struct volHeader));
assert(hd != NULL);
volume_hdr_LRU.stats.free++;
}
if (hd->back) {
- /* this header used to belong to someone else.
+ /* this header used to belong to someone else.
* we'll need to check if the header needs to
* be sync'd out to disk */
*
* @post Volume Hash Table will have 2^logsize buckets
*/
-int
+int
VSetVolHashSize(int logsize)
{
/* 64 to 16384 hash buckets seems like a reasonable range */
if ((logsize < 6 ) || (logsize > 14)) {
return -1;
}
-
+
if (!VInit) {
VolumeHashTable.Size = 1 << logsize;
VolumeHashTable.Mask = VolumeHashTable.Size - 1;
{
int i;
- VolumeHashTable.Table = (VolumeHashChainHead *) calloc(VolumeHashTable.Size,
+ VolumeHashTable.Table = (VolumeHashChainHead *) calloc(VolumeHashTable.Size,
sizeof(VolumeHashChainHead));
assert(VolumeHashTable.Table != NULL);
-
+
for (i=0; i < VolumeHashTable.Size; i++) {
queue_Init(&VolumeHashTable.Table[i]);
#ifdef AFS_DEMAND_ATTACH_FS
*
* @param[out] ec error code return
* @param[in] volumeId volume id
- * @param[in] hint volume object which we believe could be the correct
+ * @param[in] hint volume object which we believe could be the correct
mapping
*
* @return volume object pointer
* @retval NULL no such volume id is registered with the hash table.
*
- * @pre VOL_LOCK is held. For DAFS, caller must hold a lightweight
+ * @pre VOL_LOCK is held. For DAFS, caller must hold a lightweight
ref on hint.
*
- * @post volume object with the given id is returned. volume object and
- * hash chain access statistics are updated. hash chain may have
+ * @post volume object with the given id is returned. volume object and
+ * hash chain access statistics are updated. hash chain may have
* been reordered.
*
- * @note For DAFS, VOL_LOCK may be dropped in order to wait for an
- * asynchronous hash chain reordering operation to finish, or
+ * @note For DAFS, VOL_LOCK may be dropped in order to wait for an
+ * asynchronous hash chain reordering operation to finish, or
* in order for us to perform an asynchronous chain reordering.
*
- * @note Hash chain reorderings occur when the access count for the
- * volume object being looked up exceeds the sum of the previous
- * node's (the node ahead of it in the hash chain linked list)
+ * @note Hash chain reorderings occur when the access count for the
+ * volume object being looked up exceeds the sum of the previous
+ * node's (the node ahead of it in the hash chain linked list)
* access count plus the constant VOLUME_HASH_REORDER_THRESHOLD.
*
- * @note For DAFS, the hint parameter allows us to short-circuit if the
- * cacheCheck fields match between the hash chain head and the
+ * @note For DAFS, the hint parameter allows us to short-circuit if the
+ * cacheCheck fields match between the hash chain head and the
* hint volume object.
*/
Volume *
#endif /* AFS_DEMAND_ATTACH_FS */
/* someday we need to either do per-chain locks, RWlocks,
- * or both for volhash access.
+ * or both for volhash access.
* (and move to a data structure with better cache locality) */
/* search the chain for this volume id */
/* update the short-circuit cache check */
vp->chainCacheCheck = head->cacheCheck;
}
-#endif /* AFS_DEMAND_ATTACH_FS */
+#endif /* AFS_DEMAND_ATTACH_FS */
return vp;
}
* @note This interface should be called before any attempt to
* traverse the hash chain. It is permissible for a thread
* to gain exclusive access to the chain, and then perform
- * latent operations on the chain asynchronously wrt the
+ * latent operations on the chain asynchronously wrt the
* VOL_LOCK.
*
* @warning if waiting is necessary, VOL_LOCK is dropped
* @note This interface should be called before any attempt to
* traverse the VByPList. It is permissible for a thread
* to gain exclusive access to the list, and then perform
- * latent operations on the list asynchronously wrt the
+ * latent operations on the list asynchronously wrt the
* VOL_LOCK.
*
* @warning if waiting is necessary, VOL_LOCK is dropped
struct VLRUExtStatsEntry * vec;
};
-/**
+/**
* add a 256-entry fudge factor onto the vector in case state changes
* out from under us.
*/
reorders.sum += ch_reorders.sum;
len.sum += (double)head->len;
vol_sum += head->len;
-
+
if (i == 0) {
len.min = (double) head->len;
len.max = (double) head->len;
/* dump per-chain stats */
Log("Volume hash chain %d : len=%d, looks=%s, reorders=%s\n",
- i, head->len,
+ i, head->len,
DoubleToPrintable(ch_looks.sum, pr_buf[0], sizeof(pr_buf[0])),
DoubleToPrintable(ch_reorders.sum, pr_buf[1], sizeof(pr_buf[1])));
Log("\tVolume gets : min=%s, max=%s, avg=%s, total=%s\n",
} else if (flags & VOL_STATS_PER_CHAIN) {
/* dump simple per-chain stats */
Log("Volume hash chain %d : len=%d, looks=%s, gets=%s, reorders=%s\n",
- i, head->len,
+ i, head->len,
DoubleToPrintable(ch_looks.sum, pr_buf[0], sizeof(pr_buf[0])),
DoubleToPrintable(ch_gets.sum, pr_buf[1], sizeof(pr_buf[1])),
DoubleToPrintable(ch_reorders.sum, pr_buf[2], sizeof(pr_buf[2])));
* of the VGetPartitionById_r interface contract. */
diskP = VGetPartitionById_r(i, 0);
if (diskP) {
- Log("Partition %s has %d online volumes\n",
+ Log("Partition %s has %d online volumes\n",
VPartitionPath(diskP), diskP->vol_list.len);
}
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Memory resident volume information */
/**************************************/
-/**
+/**
* global volume package stats.
*/
typedef struct VolPkgStats {
* value nextVnodeVersion */
IHandle_t *diskDataHandle; /* Unix inode holding general volume info */
bit16 vnodeHashOffset; /* Computed by HashOffset function in vnode.h.
- * Assigned to the volume when initialized.
+ * Assigned to the volume when initialized.
* Added to vnode number for hash table index */
byte shuttingDown; /* This volume is going to be detached */
byte goingOffline; /* This volume is going offline */
#ifdef AFS_DEMAND_ATTACH_FS
extern Volume *VPreAttachVolumeByName(Error * ec, char *partition, char *name);
extern Volume *VPreAttachVolumeByName_r(Error * ec, char *partition, char *name);
-extern Volume *VPreAttachVolumeById_r(Error * ec, char * partition,
+extern Volume *VPreAttachVolumeById_r(Error * ec, char * partition,
VolId volumeId);
-extern Volume *VPreAttachVolumeByVp_r(Error * ec, struct DiskPartition64 * partp,
+extern Volume *VPreAttachVolumeByVp_r(Error * ec, struct DiskPartition64 * partp,
Volume * vp, VolId volume_id);
extern Volume *VGetVolumeByVp_r(Error * ec, Volume * vp);
extern int VShutdownByPartition_r(struct DiskPartition64 * dp);
/*
* Copyright 2005-2008, Sine Nomine Associates and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
static_inline int
VIsValidState(VolState state)
{
- if ((state >= 0) &&
+ if ((state >= 0) &&
(state < VOL_STATE_COUNT)) {
return 1;
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* For the single dump case, it's ok to just return the "bytes written"
* that rx_Write returns, since all the callers of iod_Write abort when
* the returned value is less than they expect. For the multi dump case,
- * I don't think we want half the replicas to go bad just because one
- * connection timed out, but if they all time out, then we should give up.
+ * I don't think we want half the replicas to go bad just because one
+ * connection timed out, but if they all time out, then we should give up.
*/
static int
iod_Write(struct iod *iodp, char *buf, int nbytes)
howBig = status.st_size;
#ifdef AFS_AIX_ENV
- /* Unfortunately in AIX valuable fields such as st_blksize are
+ /* Unfortunately in AIX valuable fields such as st_blksize are
* gone from the stat structure.
*/
#if defined(AFS_AIX52_ENV)
Log("1 Volser: DumpFile: Error reading inode %s for vnode %d\n", PrintInode(NULL, handleP->fd_ih->ih_ino), vnode);
}
- /* Pad the rest of the buffer with zeros. Remember offset we started
+ /* Pad the rest of the buffer with zeros. Remember offset we started
* padding. Keep total tally of padding.
*/
memset(p + n, 0, howMany - n);
if (vnode->type != vNull && VNDISK_GET_INO(vnode)) {
cnt1++;
if (DoLogging) {
- Log("RestoreVolume %u Cleanup: Removing old vnode=%u inode=%llu size=unknown\n",
- V_id(vp), bitNumberToVnodeNumber(i, class),
+ Log("RestoreVolume %u Cleanup: Removing old vnode=%u inode=%llu size=unknown\n",
+ V_id(vp), bitNumberToVnodeNumber(i, class),
(afs_uintmax_t) VNDISK_GET_INO(vnode));
}
IH_DEC(V_linkHandle(vp), VNDISK_GET_INO(vnode),
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#ifndef _VOLSER_DUMPSTUFF_H
#define _VOLSER_DUMPSTUFF_H
-/* This iod stuff is a silly little package to emulate the old qi_in stuff,
+/* This iod stuff is a silly little package to emulate the old qi_in stuff,
* which emulated the stdio stuff. There is a big assumption here, that the
* rx_Read will never be called directly, by a routine like readFile, when
* there is an old character that was pushed back with iod_ungetc. This
* is really bletchy, and is here for compatibility only. Eventually,
- * we should define a volume format that doesn't require the pushing back
- * of characters (i.e. characters should not double both as an end marker
- * and a begin marker)
+ * we should define a volume format that doesn't require the pushing back
+ * of characters (i.e. characters should not double both as an end marker
+ * and a begin marker)
*/
struct iod {
struct rx_call *call; /* call to which to write, might be an array */
};
extern int DumpVolume(struct rx_call *call, Volume *vp, afs_int32, int);
-extern int DumpVolMulti(struct rx_call **, int, Volume *, afs_int32, int,
+extern int DumpVolMulti(struct rx_call **, int, Volume *, afs_int32, int,
int *);
-extern int RestoreVolume(struct rx_call *, Volume *, int,
+extern int RestoreVolume(struct rx_call *, Volume *, int,
struct restoreCookie *);
extern int SizeDumpVolume(struct rx_call *, Volume *, afs_int32, int,
struct volintSize *);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/* Finds an index in VLDB entry that matches the volume type, server, and partition.
* If type is zero, will match first index of ANY type (RW, BK, or RO).
- * If server is zero, will match first index of ANY server and partition
+ * If server is zero, will match first index of ANY server and partition
* Zero is a valid partition field.
*/
int
}
/* Returns success if this server and partition matches the RW entry */
-int
+int
Lp_Match(afs_uint32 server, afs_int32 part,
struct nvldbentry *entry)
{
}
/* Return the index of the RO entry (plus 1) if it exists, else return 0 */
-int
+int
Lp_ROMatch(afs_uint32 server, afs_int32 part, struct nvldbentry *entry)
{
return (FindIndex(entry, server, part, ITSROVOL) + 1);
}
/* Return the index of the RW entry if it exists, else return -1 */
-int
+int
Lp_GetRwIndex(struct nvldbentry *entry)
{
return (FindIndex(entry, 0, 0, ITSRWVOL));
}
}
-int
+int
Lp_QScan(struct qHead *ahead, afs_int32 id, int *success, struct aqueue **elem)
{
struct aqueue *cptr;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* uses your current umask. Mode bits for directories are 0777 (then
* AND'ed with the umask). Mode bits for files are the owner mode bits
* duplicated accross group and user (then AND'ed with the umask).
- * 5. For restores of full dumps, if a directory says it has a file and
- * the file is not found, then a symbolic link "AFSFile-<#>" will
- * appear in that restored tree. Restores of incremental dumps remove
- * all these files at the end (expensive because it is a tree search).
- * 6. If a file or directory was found in the dump but found not to be
- * connected to the hierarchical tree, then the file or directory
- * will be connected at the root of the tree as "__ORPHANEDIR__.<#>"
- * or "__ORPHANFILE__.<#>".
+ * 5. For restores of full dumps, if a directory says it has a file and
+ * the file is not found, then a symbolic link "AFSFile-<#>" will
+ * appear in that restored tree. Restores of incremental dumps remove
+ * all these files at the end (expensive because it is a tree search).
+ * 6. If a file or directory was found in the dump but found not to be
+ * connected to the hierarchical tree, then the file or directory
+ * will be connected at the root of the tree as "__ORPHANEDIR__.<#>"
+ * or "__ORPHANFILE__.<#>".
* 7. ACLs are not restored.
*
*/
if (this_vn & 1) {
/*ADIRENTRY*/
/* dirname is the directory to create.
- * vflink is what will link to it.
+ * vflink is what will link to it.
*/
afs_snprintf(dirname, sizeof dirname, "%s/%s",
parentdir, this_name);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
System: VICE-TWO
Module: vol-dump.c
Institution: The Information Technology Center, Carnegie-Mellon University
-
+
*/
#include <afsconfig.h>
howBig = status.st_size;
#ifdef AFS_AIX_ENV
- /* Unfortunately in AIX valuable fields such as st_blksize are
+ /* Unfortunately in AIX valuable fields such as st_blksize are
* gone from the stat structure.
*/
fstatfs(handleP->fd_fd, &tstatfs);
PrintInode(NULL, handleP->fd_ih->ih_ino), vnode);
}
- /* Pad the rest of the buffer with zeros. Remember offset we started
+ /* Pad the rest of the buffer with zeros. Remember offset we started
* padding. Keep total tally of padding.
*/
memset(p + n, 0, howMany - n);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
char line[1024];
};
-static afs_int32
-ExtractVnodes(struct Msg *m, Volume *vol, afs_int32 class,
+static afs_int32
+ExtractVnodes(struct Msg *m, Volume *vol, afs_int32 class,
struct VnodeExtract **list,
afs_uint32 *length, afs_uint32 where,
struct VnodeDiskObject *vd,
fdP = IH_OPEN(vol->vnodeIndex[class].handle);
if (!fdP) {
- sprintf(m->line, "Couldn't open %s Index of volume %u\n",
+ sprintf(m->line, "Couldn't open %s Index of volume %u\n",
class ? "small":"large", V_id(vol));
rx_Write(m->call, m->line, strlen(m->line));
code = EIO;
memset(*list, 0, size / vcp->diskSize * sizeof(struct VnodeExtract));
stream = FDH_FDOPEN(fdP, "r");
if (!stream) {
- sprintf(m->line, "Couldn't stream open %s Index of volume %u\n",
+ sprintf(m->line, "Couldn't stream open %s Index of volume %u\n",
class ? "small":"large", V_id(vol));
rx_Write(m->call, m->line, strlen(m->line));
return EIO;
if (*parent) {
offset = (*parent + 1 - class) << (vcp->logSize -1);
code = STREAM_SEEK(stream, offset, 0);
- if (STREAM_READ(vnode, vcp->diskSize, 1, stream) == 1)
+ if (STREAM_READ(vnode, vcp->diskSize, 1, stream) == 1)
memcpy(parentvd, vnode, vcp->diskSize);
else
code = EIO;
V_id(vol));
rx_Write(m->call, m->line, strlen(m->line));
}
-
+
Bad_Extract:
if (stream)
STREAM_CLOSE(stream);
return code;
}
-static afs_int32
-FindVnodes(struct Msg *m, afs_uint32 where,
- struct VnodeExtract *list, afs_int32 length,
- struct VnodeExtract *dlist, afs_int32 dlength,
+static afs_int32
+FindVnodes(struct Msg *m, afs_uint32 where,
+ struct VnodeExtract *list, afs_int32 length,
+ struct VnodeExtract *dlist, afs_int32 dlength,
afs_uint32 *needed, afs_int32 class)
{
afs_int32 i, j, found = 0;
list[i].flag |= (NEEDED + CHANGEPARENT);
(*needed)++;
}
- }
+ }
if (list[0].vN & 1) { /* only for directories */
if (!found) {
- sprintf(m->line,
+ sprintf(m->line,
"SplitVolume: directory %u where to start new volume not found\n",
where);
rx_Write(m->call, m->line, strlen(m->line));
return ENOENT;
}
found = 0;
- for (i=0; i<length; i++) {
+ for (i=0; i<length; i++) {
if (list[i].vN == parent) { /* dir where to create mount point */
list[i].flag |= PARENT;
found = 1;
}
}
if (!found) {
- sprintf(m->line, "SplitVolume: parent directory %u not found\n",
+ sprintf(m->line, "SplitVolume: parent directory %u not found\n",
parent);
rx_Write(m->call, m->line, strlen(m->line));
return ENOENT;
}
}
if (m->verbose) {
- sprintf(m->line, "%u %s vnodes will go into the new volume\n",
+ sprintf(m->line, "%u %s vnodes will go into the new volume\n",
*needed, class ? "small" : "large");
rx_Write(m->call, m->line, strlen(m->line));
}
return 0;
}
-
-static afs_int32
+
+static afs_int32
copyDir(struct Msg *m, IHandle_t *inh, IHandle_t *outh)
{
FdHandle_t *infdP, *outfdP;
infdP = IH_OPEN(inh);
if (!infdP) {
- sprintf(m->line, "Couldn't open input directory %u.%u.%u\n",
+ sprintf(m->line, "Couldn't open input directory %u.%u.%u\n",
infdP->fd_ih->ih_vid,
(afs_uint32)(infdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
(afs_uint32)(infdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
}
outfdP = IH_OPEN(outh);
if (!outfdP) {
- sprintf(m->line, "Couldn't open output directory %u.%u.%u\n",
+ sprintf(m->line, "Couldn't open output directory %u.%u.%u\n",
outfdP->fd_ih->ih_vid,
(afs_uint32)(outfdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
(afs_uint32)(outfdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
size_t tlen;
tlen = size > 2048 ? 2048 : size;
if (FDH_READ(infdP, tbuf, tlen) != tlen) {
- sprintf(m->line, "Couldn't read directory %u.%u.%u\n",
+ sprintf(m->line, "Couldn't read directory %u.%u.%u\n",
infdP->fd_ih->ih_vid,
(afs_uint32)(infdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
(afs_uint32)(infdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
return EIO;
}
if (FDH_WRITE(outfdP, tbuf, tlen) != tlen) {
- sprintf(m->line, "Couldn't write directory %u.%u.%u\n",
+ sprintf(m->line, "Couldn't write directory %u.%u.%u\n",
outfdP->fd_ih->ih_vid,
(afs_uint32)(outfdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
(afs_uint32)(outfdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
return 0;
}
-afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol,
- afs_int32 class,
+afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol,
+ afs_int32 class,
struct VnodeExtract *list, afs_int32 length,
afs_int32 where, afs_uint64 *blocks,
- struct VnodeDiskObject *parVnode)
+ struct VnodeDiskObject *parVnode)
{
afs_int32 i, code = 0;
char buf[SIZEOF_LARGEDISKVNODE];
fdP = IH_OPEN(vol->vnodeIndex[class].handle);
if (!fdP) {
- Log("Couldn't open %s Index of volume %u\n",
+ Log("Couldn't open %s Index of volume %u\n",
class ? "small":"large", V_id(vol));
code = EIO;
goto Bad_Copy;
}
newfdP = IH_OPEN(newvol->vnodeIndex[class].handle);
if (!newfdP) {
- Log("Couldn't open %s Index of volume %u\n",
+ Log("Couldn't open %s Index of volume %u\n",
class ? "small":"large", V_id(newvol));
code = EIO;
goto Bad_Copy;
goto Bad_Copy;
}
if (e->flag & PARENT) {
- /*
- * do a preventive copy on write for later update
- */
+ /*
+ * do a preventive copy on write for later update
+ */
IHandle_t *newh = 0;
IHandle_t *h = 0;
#if defined(NEARINODE_HINT) && !defined(AFS_NAMEI_ENV)
newino = IH_CREATE(V_linkHandle(vol), V_device(vol),
VPartitionPath(V_partition(vol)),
- nearInode, V_parentId(vol),
+ nearInode, V_parentId(vol),
e->vN, vnode->uniquifier,
vnode->dataVersion);
IH_INIT(newh, V_device(vol), V_parentId(vol), newino);
V_pref(vol,nearInode)
#endif
IH_INIT(h, vol->device, V_parentId(vol), ino);
- if (e->parent == where)
+ if (e->parent == where)
vnode->parent = 1;
newino = IH_CREATE(V_linkHandle(newvol), V_device(newvol),
VPartitionPath(V_partition(newvol)),
- nearInode, V_parentId(newvol),
+ nearInode, V_parentId(newvol),
e->vN, vnode->uniquifier,
vnode->dataVersion);
if (!VALID_INO(newino)) {
- Log("IH_CREATE failed for %u.%u.%u\n",
+ Log("IH_CREATE failed for %u.%u.%u\n",
V_id(newvol), e->vN, vnode->uniquifier);
code = EIO;
goto Bad_Copy;
}
}
/*
- * Now copy the root directory from old to new volume
+ * Now copy the root directory from old to new volume
*/
if (class == vLarge) {
IHandle_t *h, *newh;
char buf2[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode2 = (struct VnodeDiskObject *)&buf2;
afs_uint64 newoffset;
-
+
newoffset = vcp->diskSize;
if (FDH_SEEK(newfdP, newoffset, 0) != newoffset
|| FDH_READ(newfdP, vnode2, vcp->diskSize) != vcp->diskSize) {
- Log("splitvolume: couldn't read in large Index of new volume %u at offset %u\n",
+ Log("splitvolume: couldn't read in large Index of new volume %u at offset %u\n",
V_id(newvol), vcp->diskSize);
code = EIO;
goto Bad_Copy;
vnode->serverModifyTime = vnode2->serverModifyTime;
if (FDH_SEEK(newfdP, newoffset, 0) != newoffset
|| FDH_WRITE(newfdP, vnode, vcp->diskSize) != vcp->diskSize) {
- Log("splitvolume: couldn't write in large Index of %u at offset %u\n",
+ Log("splitvolume: couldn't write in large Index of %u at offset %u\n",
V_id(newvol), vcp->diskSize);
code = EIO;
- }
+ }
}
Bad_Copy:
if (fdP)
}
static afs_int32
-findName(Volume *vol, struct VnodeDiskObject *vd, afs_uint32 vN,
+findName(Volume *vol, struct VnodeDiskObject *vd, afs_uint32 vN,
afs_uint32 un, char *name,afs_int32 length)
{
afs_int32 code;
SetSalvageDirHandle(&dir, V_id(vol), V_device(vol), ino);
code = InverseLookup(&dir, vN, un, name, length);
- FidZap(&dir);
+ FidZap(&dir);
return code;
}
static afs_int32
-createMountpoint(Volume *vol, Volume *newvol, struct VnodeDiskObject *parent,
+createMountpoint(Volume *vol, Volume *newvol, struct VnodeDiskObject *parent,
afs_uint32 vN, struct VnodeDiskObject *vd, char *name)
{
afs_int32 code;
newino = IH_CREATE(V_linkHandle(vol), V_device(vol),
VPartitionPath(V_partition(vol)), nearInode,
V_parentId(vol), newvN, vnode.uniquifier, 1);
-
+
IH_INIT(h, V_device(vol), V_parentId(vol), newino);
fdP2 = IH_OPEN(h);
if (!fdP2) {
- Log("split volume: couldn't open inode for mountpoint %u.%u.%u\n",
+ Log("split volume: couldn't open inode for mountpoint %u.%u.%u\n",
V_id(vol), newvN, vnode.uniquifier);
return EIO;
}
sprintf(symlink, "#%s", V_name(newvol));
size = strlen(symlink) + 1;
if (FDH_WRITE(fdP2, symlink, size) != size) {
- Log("split volume: couldn't write mountpoint %u.%u.%u\n",
+ Log("split volume: couldn't write mountpoint %u.%u.%u\n",
V_id(vol), newvN, vnode.uniquifier);
return EIO;
}
VNDISK_SET_LEN(&vnode, size);
#ifndef AFS_RXOSD_SUPPORT
vnode.vnodeMagic = SMALLVNODEMAGIC;
-#endif
+#endif
if (FDH_SEEK(fdP, offset, 0) != offset
|| FDH_WRITE(fdP, &vnode, vcp->diskSize) != vcp->diskSize) {
- Log("split volume: couldn't write vnode for mountpoint %u.%u.%u\n",
+ Log("split volume: couldn't write vnode for mountpoint %u.%u.%u\n",
V_id(vol), newvN, vnode.uniquifier);
return EIO;
}
return code;
}
code = Create(&dir, name, &fid);
- FidZap(&dir);
-
+ FidZap(&dir);
+
class = vLarge;
vcp = &VnodeClassInfo[class];
fdP = IH_OPEN(vol->vnodeIndex[class].handle);
parent->dataVersion++;
if (FDH_SEEK(fdP, offset, 0) != offset
|| FDH_WRITE(fdP, parent, vcp->diskSize) != vcp->diskSize) {
- Log("split volume: couldn't write vnode for parent directory %u.%u.%u\n",
+ Log("split volume: couldn't write vnode for parent directory %u.%u.%u\n",
V_id(vol), vN, parent->uniquifier);
return EIO;
}
return code;
}
-static afs_int32
-deleteVnodes(Volume *vol, afs_int32 class,
+static afs_int32
+deleteVnodes(Volume *vol, afs_int32 class,
struct VnodeExtract *list, afs_int32 length,
afs_uint64 *blocks)
{
fdP = IH_OPEN(vol->vnodeIndex[class].handle);
if (!fdP) {
- Log("Couldn't open %s Index of volume %u\n",
+ Log("Couldn't open %s Index of volume %u\n",
class ? "small":"large", V_id(vol));
code = EIO;
goto Bad_Delete;
}
memset(vnode, 0, vcp->diskSize);
vnode->type = vNull;
- if (FDH_SEEK(fdP, offset, 0) != offset
+ if (FDH_SEEK(fdP, offset, 0) != offset
|| FDH_WRITE(fdP, vnode, vcp->diskSize) != vcp->diskSize) {
Log("Couldn't write in %s Index of volume %u to offset %"
AFS_UINT64_FMT "\n", class ? "small":"large",
return code;
}
-afs_int32
-split_volume(struct rx_call *call, Volume *vol, Volume *newvol,
+afs_int32
+split_volume(struct rx_call *call, Volume *vol, Volume *newvol,
afs_uint32 where, afs_int32 verbose)
{
Error code = 0;
m->call = call;
m->verbose = verbose;
- /*
+ /*
* First step: planning
*
* Find out which directories will belong to the new volume
*
*/
if (verbose) {
- sprintf(m->line,
+ sprintf(m->line,
"1st step: extract vnode essence from large vnode file\n");
rx_Write(m->call, m->line, strlen(m->line));
}
- code = ExtractVnodes(m, vol, vLarge, &dirList, &dl, where, rootVnode,
+ code = ExtractVnodes(m, vol, vLarge, &dirList, &dl, where, rootVnode,
&parent, parVnode);
if (code) {
- sprintf(m->line,
+ sprintf(m->line,
"ExtractVnodes failed for %u for directories with code %d\n",
V_id(vol), code);
rx_Write(m->call, m->line, strlen(m->line));
if (verbose) {
sprintf(m->line, "2nd step: look for name of vnode %u in directory %u.%u.%u\n",
- where, V_id(vol), parent, parVnode->uniquifier);
+ where, V_id(vol), parent, parVnode->uniquifier);
rx_Write(m->call, m->line, strlen(m->line));
}
- code = findName(vol, parVnode, where, rootVnode->uniquifier,
+ code = findName(vol, parVnode, where, rootVnode->uniquifier,
name, sizeof(name));
if (code) {
- sprintf(m->line,
+ sprintf(m->line,
"splitvolume: could'nt find name of %u in directory %u.%u.%u.\n",
- where, V_id(vol), parent, parVnode->uniquifier);
+ where, V_id(vol), parent, parVnode->uniquifier);
rx_Write(m->call, m->line, strlen(m->line));
return code;
}
if (verbose) {
- sprintf(m->line, "name of %u is %s\n", where, name);
+ sprintf(m->line, "name of %u is %s\n", where, name);
rx_Write(m->call, m->line, strlen(m->line));
}
if (verbose) {
- sprintf(m->line, "3rd step: find all directory vnodes belonging to the subtree under %u \"%s\"\n",
+ sprintf(m->line, "3rd step: find all directory vnodes belonging to the subtree under %u \"%s\"\n",
where, name);
rx_Write(m->call, m->line, strlen(m->line));
}
code = FindVnodes(m, where, dirList, dl, dirList, dl, &dirsNeeded, 1);
if (code) {
- sprintf(m->line,
+ sprintf(m->line,
"FindVnodes for directories failed with code %d\n", code);
rx_Write(m->call, m->line, strlen(m->line));
return code;
}
code = ExtractVnodes(m, vol, vSmall, &fileList, &fl, where, 0, 0, 0);
if (code) {
- sprintf(m->line,
+ sprintf(m->line,
"ExtractVnodes failed for %u for files with code %d\n",
V_id(vol), code);
rx_Write(m->call, m->line, strlen(m->line));
return code;
}
if (verbose) {
- sprintf(m->line, "5th step: find all small vnodes belonging to the subtree under %u \"%s\"\n",
+ sprintf(m->line, "5th step: find all small vnodes belonging to the subtree under %u \"%s\"\n",
where, name);
rx_Write(m->call, m->line, strlen(m->line));
}
FindVnodes(m, where, fileList, fl, dirList, dl, &filesNeeded, 0);
- /*
+ /*
* Third step: create hard links for all files needed
*
*/
sprintf(m->line, "6th step: create hard links in the AFSIDat tree between files of the old and new volume\n");
rx_Write(m->call, m->line, strlen(m->line));
}
- code = copyVnodes(m, vol, newvol, 1, fileList, fl, where, &blocks, 0);
+ code = copyVnodes(m, vol, newvol, 1, fileList, fl, where, &blocks, 0);
if (code) {
sprintf(m->line, "copyVnodes for files failed with code %d\n", code);
rx_Write(m->call, m->line, strlen(m->line));
return code;
}
-
- /*
- * Forth step: create hard links for all directories and copy
+
+ /*
+ * Forth step: create hard links for all directories and copy
* split directory to new root directory
*/
where);
rx_Write(m->call, m->line, strlen(m->line));
}
- code = copyVnodes(m, vol, newvol, 0, dirList, dl, where, &blocks, parVnode);
+ code = copyVnodes(m, vol, newvol, 0, dirList, dl, where, &blocks, parVnode);
if (code) {
sprintf(m->line, "copyVnodes for directories failed with code %d\n", code);
rx_Write(m->call, m->line, strlen(m->line));
sprintf(m->line, "9th step: create mountpoint \"%s\" for new volume in old volume's directory %u.\n", name, parent);
rx_Write(m->call, m->line, strlen(m->line));
}
-
+
code = createMountpoint(vol, newvol, parVnode, parent, rootVnode, name);
if (code) {
sprintf(m->line, "createMountpoint failed with code %d\n", code);
* Now both volumes should be ready and consistent, but the old volume
* contains still the vnodes and data we transferred into the new one.
* Delete orphaned vnodes and data.
- */
+ */
blocks = 0;
if (verbose) {
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
-#
+#
# This software has been released under the terms of the IBM Public
# License. For details, see the LICENSE file in the top-level source
# directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct diskPartition {
char name[32]; /* Mounted partition name */
- char devName[32];
+ char devName[32];
int lock_fd;
int totalUsable;
int free;
struct diskPartition64 {
char name[256]; /* Mounted partition name */
- char devName[256];
+ char devName[256];
int lock_fd;
afs_int64 totalUsable;
afs_int64 free;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
struct afsconf_dir *tdir;
static afs_int32 runningCalls = 0;
int DoLogging = 0;
-int debuglevel = 0;
+int debuglevel = 0;
#define MAXLWP 128
int lwps = 9;
int udpBufSize = 0; /* UDP buffer size for receive */
}
/* Called every GCWAKEUP seconds to try to unlock all our partitions,
- * if we're idle and there are no active transactions
+ * if we're idle and there are no active transactions
*/
static void
TryUnlock(void)
}
#include "AFS_component_version_number.c"
-int
+int
main(int argc, char **argv)
{
afs_int32 code;
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
rxkadDisableDotCheck = 1;
} else if (strcmp(argv[code], "-d") == 0) {
if ((code + 1) >= argc) {
- fprintf(stderr, "missing argument for -d\n");
- return -1;
+ fprintf(stderr, "missing argument for -d\n");
+ return -1;
}
debuglevel = atoi(argv[++code]);
LogLevel = debuglevel;
rxJumbograms = 1;
} else if (!strcmp(argv[code], "-rxmaxmtu")) {
if ((code + 1) >= argc) {
- fprintf(stderr, "missing argument for -rxmaxmtu\n");
- exit(1);
+ fprintf(stderr, "missing argument for -rxmaxmtu\n");
+ exit(1);
}
rxMaxMTU = atoi(argv[++code]);
- if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
+ if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
printf("rxMaxMTU %d invalid; must be between %d-%" AFS_SIZET_FMT "\n",
- rxMaxMTU, RX_MIN_PACKET_SIZE,
+ rxMaxMTU, RX_MIN_PACKET_SIZE,
RX_MAX_PACKET_DATA_SIZE);
exit(1);
}
rx_SetUdpBufSize(udpBufSize); /* set the UDP buffer size for receive */
if (rxBind) {
afs_int32 ccode;
- if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
+ if (AFSDIR_SERVER_NETRESTRICT_FILEPATH ||
AFSDIR_SERVER_NETINFO_FILEPATH) {
char reason[1024];
ccode = parseNetFiles(SHostAddrs, NULL, NULL,
ADDRSPERSITE, reason,
AFSDIR_SERVER_NETINFO_FILEPATH,
AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- } else
+ } else
{
ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
}
- if (ccode == 1)
+ if (ccode == 1)
host = SHostAddrs[0];
}
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
#endif
afs_int32 localTid = 1;
-
+
static afs_int32 VolPartitionInfo(struct rx_call *, char *pname,
struct diskPartition64 *);
static afs_int32 VolNukeVolume(struct rx_call *, afs_int32, afs_uint32);
static afs_int32 VolSetDate(struct rx_call *, afs_int32, afs_int32);
/* this call unlocks all of the partition locks we've set */
-int
+int
VPFullUnlock_r(void)
{
struct DiskPartition64 *tp;
}
afs_int32
-SAFSVolPartitionInfo(struct rx_call *acid, char *pname, struct diskPartition
+SAFSVolPartitionInfo(struct rx_call *acid, char *pname, struct diskPartition
*partition)
{
afs_int32 code;
}
afs_int32
-SAFSVolPartitionInfo64(struct rx_call *acid, char *pname, struct diskPartition64
+SAFSVolPartitionInfo64(struct rx_call *acid, char *pname, struct diskPartition64
*partition)
{
afs_int32 code;
}
afs_int32
-VolPartitionInfo(struct rx_call *acid, char *pname, struct diskPartition64
+VolPartitionInfo(struct rx_call *acid, char *pname, struct diskPartition64
*partition)
{
struct DiskPartition64 *dp;
* Return the new volume id in *avolid.
*/
afs_int32
-SAFSVolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
- afs_int32 atype, afs_uint32 aparent, afs_uint32 *avolid,
+SAFSVolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
+ afs_int32 atype, afs_uint32 aparent, afs_uint32 *avolid,
afs_int32 *atrans)
{
afs_int32 code;
}
static afs_int32
-VolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
- afs_int32 atype, afs_uint32 aparent, afs_uint32 *avolid,
+VolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
+ afs_int32 atype, afs_uint32 aparent, afs_uint32 *avolid,
afs_int32 *atrans)
{
Error error;
*/
/* for efficiency reasons, sometimes faster to piggyback a purge here */
afs_int32
-SAFSVolClone(struct rx_call *acid, afs_int32 atrans, afs_uint32 purgeId,
+SAFSVolClone(struct rx_call *acid, afs_int32 atrans, afs_uint32 purgeId,
afs_int32 newType, char *newName, afs_uint32 *newNumber)
{
afs_int32 code;
}
static afs_int32
-VolClone(struct rx_call *acid, afs_int32 atrans, afs_uint32 purgeId,
+VolClone(struct rx_call *acid, afs_int32 atrans, afs_uint32 purgeId,
afs_int32 newType, char *newName, afs_uint32 *newNumber)
{
afs_uint32 newId;
LogError(error);
goto fail;
}
- /* VUpdateVolume succeeded. Mark it in service so there's no window
- * between FSYNC_VOL_ON and VolSetFlags where it's offline with no
- * specialStatus; this is a reclone and this volume started online
+ /* VUpdateVolume succeeded. Mark it in service so there's no window
+ * between FSYNC_VOL_ON and VolSetFlags where it's offline with no
+ * specialStatus; this is a reclone and this volume started online
*/
V_inService(clonevp) = 1;
VDetachVolume(&error, clonevp); /* allow file server to get it's hands on it */
*/
afs_int32
SAFSVolForward(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
- struct destServer *destination, afs_int32 destTrans,
+ struct destServer *destination, afs_int32 destTrans,
struct restoreCookie *cookie)
{
afs_int32 code;
static afs_int32
VolForward(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
- struct destServer *destination, afs_int32 destTrans,
+ struct destServer *destination, afs_int32 destTrans,
struct restoreCookie *cookie)
{
struct volser_trans *tt;
/* Start a dump and send it to multiple places simultaneously.
* If this returns an error (eg, return ENOENT), it means that
- * none of the releases worked. If this returns 0, that means
+ * none of the releases worked. If this returns 0, that means
* that one or more of the releases worked, and the caller has
* to examine the results array to see which one(s).
* This will only do EITHER incremental or full, not both, so it's
* the caller's responsibility to be sure that all the destinations
- * need just an incremental (and from the same time), if that's
- * what we're doing.
+ * need just an incremental (and from the same time), if that's
+ * what we're doing.
*/
afs_int32
-SAFSVolForwardMultiple(struct rx_call *acid, afs_int32 fromTrans, afs_int32
+SAFSVolForwardMultiple(struct rx_call *acid, afs_int32 fromTrans, afs_int32
fromDate, manyDests *destinations, afs_int32 spare,
struct restoreCookie *cookie, manyResults *results)
{
i = results->manyResults_len = destinations->manyDests_len;
results->manyResults_val = codes =
(afs_int32 *) malloc(i * sizeof(afs_int32));
- }
+ }
if (!results || !results->manyResults_val)
return ENOMEM;
return 0;
}
-/*
+/*
* Ha! No more helper process!
*/
afs_int32
* -- tkeiser 11/27/2007
*/
- /* Conditions that offline status is based on:
+ /* Conditions that offline status is based on:
volume is unattached state
volume state is in (one of several error states)
volume not in service
volume is not marked as blessed (not on hold)
volume in salvage req. state
- volume needsSalvaged
+ volume needsSalvaged
next op would set volume offline
next op would not leave volume online (based on several conditions)
*/
(V_attachState(vp) == VOL_STATE_UNATTACHED) ||
VIsErrorState(V_attachState(vp)) ||
!hdr->inService ||
- !hdr->blessed ||
+ !hdr->blessed ||
(V_attachState(vp) == VOL_STATE_SALVSYNC_REQ) ||
hdr->needsSalvaged ||
- (vp->pending_vol_op &&
- (vp->pending_vol_op->com.command == FSYNC_VOL_OFF ||
+ (vp->pending_vol_op &&
+ (vp->pending_vol_op->com.command == FSYNC_VOL_OFF ||
!VVolOpLeaveOnline_r(vp, vp->pending_vol_op) )
)
) {
#ifdef AFS_DEMAND_ATTACH_FS
/* see comment above where we set inUse bit */
- if (hdr->needsSalvaged ||
+ if (hdr->needsSalvaged ||
(vp && VIsErrorState(V_attachState(vp)))) {
handle->volinfo_ptr.base->needsSalvaged = 1;
} else {
#endif
handle->volinfo_ptr.base->destroyMe = hdr->destroyMe;
handle->volinfo_ptr.base->spare0 = hdr->minquota;
- handle->volinfo_ptr.base->spare1 =
+ handle->volinfo_ptr.base->spare1 =
(long)hdr->weekUse[0] +
(long)hdr->weekUse[1] +
(long)hdr->weekUse[2] +
0, numStatBytes);
} else {
memcpy((char *)&(handle->volinfo_ptr.ext->stat_reads[0]),
- (char *)&(hdr->stat_reads[0]),
+ (char *)&(hdr->stat_reads[0]),
numStatBytes);
}
break;
*
* @param[in] volumeId volumeId for which we want state information
* @param[in] pname partition name string
- * @param[inout] vp pointer to pointer to Volume object which
+ * @param[inout] vp pointer to pointer to Volume object which
* will be populated (see note)
*
* @return operation status
static int
GetVolInfo(afs_uint32 partId,
afs_uint32 volumeId,
- char * pname,
- char * volname,
+ char * pname,
+ char * volname,
volint_info_handle_t * handle,
vol_info_list_mode_t mode)
{
/* Get volume from volserver */
tv = VAttachVolumeByName_retry(&error, pname, volname, V_PEEK);
if (error) {
- Log("1 Volser: GetVolInfo: Could not attach volume %u (%s:%s) error=%d\n",
+ Log("1 Volser: GetVolInfo: Could not attach volume %u (%s:%s) error=%d\n",
volumeId, pname, volname, error);
goto drop;
}
goto drop;
case VOL_INFO_LIST_SINGLE:
- Log("1 Volser: GetVolInfo: Volume %u (%s:%s) will be destroyed on next salvage\n",
+ Log("1 Volser: GetVolInfo: Volume %u (%s:%s) will be destroyed on next salvage\n",
volumeId, pname, volname);
default:
if (tv->header->diskstuff.needsSalvaged) {
/*this volume will be salvaged */
- Log("1 Volser: GetVolInfo: Volume %u (%s:%s) needs to be salvaged\n",
+ Log("1 Volser: GetVolInfo: Volume %u (%s:%s) needs to be salvaged\n",
volumeId, pname, volname);
}
}
/* fs_tv is a shallow copy, must populate certain structures before passing along */
- if (FSYNC_VolOp(volumeId, pname, FSYNC_VOL_QUERY_VOP, 0, &fs_res) == SYNC_OK) {
+ if (FSYNC_VolOp(volumeId, pname, FSYNC_VOL_QUERY_VOP, 0, &fs_res) == SYNC_OK) {
/* If we if the pending vol op */
memcpy(&pending_vol_op_res, fs_res.payload.buf, sizeof(FSSYNC_VolOp_info));
fs_tv->pending_vol_op=&pending_vol_op_res;
/* When using DAFS, use the fs volume info, populated with required structures */
fill_tv = fs_tv;
-#else
+#else
/* When not using DAFS, just use the local volume info */
fill_tv = tv;
#endif
/*return the header information about the <volid> */
afs_int32
-SAFSVolListOneVolume(struct rx_call *acid, afs_int32 partid,
+SAFSVolListOneVolume(struct rx_call *acid, afs_int32 partid,
afs_uint32 volumeId, volEntries *volumeInfo)
{
afs_int32 code;
}
static afs_int32
-VolListOneVolume(struct rx_call *acid, afs_int32 partid,
+VolListOneVolume(struct rx_call *acid, afs_int32 partid,
afs_uint32 volumeId, volEntries *volumeInfo)
{
volintInfo *pntr;
handle.volinfo_type = VOLINT_INFO_TYPE_BASE;
handle.volinfo_ptr.base = volumeInfo->volEntries_val;
-
- code = GetVolInfo(partid,
- volid,
- pname,
+
+ code = GetVolInfo(partid,
+ volid,
+ pname,
volname,
&handle,
VOL_INFO_LIST_SINGLE);
*------------------------------------------------------------------------*/
afs_int32
-SAFSVolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID,
+SAFSVolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID,
afs_uint32 a_volID, volXEntries *a_volumeXInfoP)
{
afs_int32 code;
}
static afs_int32
-VolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID,
+VolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID,
afs_uint32 a_volID, volXEntries *a_volumeXInfoP)
{ /*SAFSVolXListOneVolume */
return (found) ? 0 : ENODEV;
} /*SAFSVolXListOneVolume */
-/*returns all the volumes on partition partid. If flags = 1 then all the
+/*returns all the volumes on partition partid. If flags = 1 then all the
* relevant info about the volumes is also returned */
afs_int32
-SAFSVolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
+SAFSVolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
volEntries *volumeInfo)
{
afs_int32 code;
}
static afs_int32
-VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
+VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
volEntries *volumeInfo)
{
volintInfo *pntr;
(volintInfo *) realloc((char *)volumeInfo->volEntries_val,
allocSize * sizeof(volintInfo));
if (pntr == NULL) {
- closedir(dirp);
+ closedir(dirp);
return VOLSERNO_MEMORY;
}
volumeInfo->volEntries_val = pntr; /* point to new block */
GetNextVol(dirp, volname, &volid);
continue; /*back to while loop */
}
-
+
if (volid == volumeId) { /*copy other things too */
#ifndef AFS_PTHREAD_ENV
IOMGR_Poll(); /*make sure that the client doesnot time out */
}
GetNextVol(dirp, volname, &volid);
}
-
+
if (ttc) {
DeleteTrans(ttc, 1);
ttc = (struct volser_trans *)0;
}
-
+
closedir(dirp);
return ret;
#endif
char caller[MAXKTCNAMELEN];
char line[128];
- if (!afsconf_SuperUser(tdir, acall, caller))
+ if (!afsconf_SuperUser(tdir, acall, caller))
return EPERM;
vol = VAttachVolume(&code, vid, V_VOLUPD);
code = ENOENT;
return code;
}
- if (V_device(vol) != V_device(newvol)
+ if (V_device(vol) != V_device(newvol)
|| V_uniquifier(newvol) != 2) {
if (V_device(vol) != V_device(newvol)) {
sprintf(line, "Volumes %u and %u are not in the same partition, aborted.\n",
VDetachVolume(&code2, vol);
VDetachVolume(&code2, newvol);
return VOLSERVOLBUSY;
- }
+ }
VTRANS_OBJ_LOCK(tt);
tt->iflags = ITBusy;
tt->vflags = 0;
VDetachVolume(&code2, vol);
VDetachVolume(&code2, newvol);
return VOLSERVOLBUSY;
- }
+ }
VTRANS_OBJ_LOCK(tt2);
tt2->iflags = ITBusy;
tt2->vflags = 0;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
};
-/* This is how often the garbage collection thread wakes up and
+/* This is how often the garbage collection thread wakes up and
* checks for transactions that have timed out: BKGLoop()
*/
#define GCWAKEUP 30
#define VSALVAGE 101 /* Volume needs salvage */
#define VNOVNODE 102 /* Bad vnode number quoted */
-#define VNOVOL 103 /* Volume not attached, doesn't exist,
+#define VNOVOL 103 /* Volume not attached, doesn't exist,
* not created or not online */
#define VVOLEXISTS 104 /* Volume already exists */
#define VNOSERVICE 105 /* Volume is not in service (i.e. it's
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
afs_uint32 volid, volintInfo * infop);
extern void MapNetworkToHost(struct nvldbentry *old, struct nvldbentry *new);
extern int UV_CopyVolume2(afs_uint32 afromvol, afs_uint32 afromserver,
- afs_int32 afrompart, char *atovolname,
+ afs_int32 afrompart, char *atovolname,
afs_uint32 atoserver, afs_int32 atopart,
afs_uint32 atovolid, int flags);
extern int UV_CloneVolume(afs_uint32 aserver, afs_int32 apart, afs_uint32 avolid,
(struct rx_call *, void *),
void *rock, afs_int32 flags);
extern int UV_GetSize(afs_uint32 afromvol, afs_uint32 afromserver,
- afs_int32 afrompart, afs_int32 fromdate,
+ afs_int32 afrompart, afs_int32 fromdate,
struct volintSize *vol_size);
extern int verbose;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
}
/* delete transaction if refcount == 1, otherwise queue delete for later. Does implicit TRELE */
-afs_int32
+afs_int32
DeleteTrans(struct volser_trans *atrans, afs_int32 lock)
{
struct volser_trans *tt, **lt;
/* THOLD is a macro defined in volser.h */
/* put a transaction back */
-afs_int32
+afs_int32
TRELE(struct volser_trans *at)
{
VTRANS_LOCK;
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
- /*sends the contents of file associated with <fd> and <blksize> to Rx Stream
+ /*sends the contents of file associated with <fd> and <blksize> to Rx Stream
* associated with <call> */
-int
+int
SendFile(usd_handle_t ufd, struct rx_call *call, long blksize)
{
char *buffer = (char *)0;
long blksize;
afs_int32 error, code;
int ufdIsOpen = 0;
- afs_hyper_t filesize, currOffset;
- afs_uint32 buffer;
- afs_uint32 got;
+ afs_hyper_t filesize, currOffset;
+ afs_uint32 buffer;
+ afs_uint32 got;
error = 0;
fprintf(STDOUT, "serv\t\t%s\t%s\n", address, hostname);
fprintf(STDOUT, "part\t\t%s\n", pname);
fprintf(STDOUT, "status\t\tOK\n");
- fprintf(STDOUT, "backupID\t%lu\n",
+ fprintf(STDOUT, "backupID\t%lu\n",
afs_printable_uint32_lu(a_xInfoP->backupID));
- fprintf(STDOUT, "parentID\t%lu\n",
+ fprintf(STDOUT, "parentID\t%lu\n",
afs_printable_uint32_lu(a_xInfoP->parentID));
- fprintf(STDOUT, "cloneID\t\t%lu\n",
+ fprintf(STDOUT, "cloneID\t\t%lu\n",
afs_printable_uint32_lu(a_xInfoP->cloneID));
fprintf(STDOUT, "inUse\t\t%s\n", a_xInfoP->inUse ? "Y" : "N");
switch (a_xInfoP->type) {
break;
}
t = a_xInfoP->creationDate;
- fprintf(STDOUT, "creationDate\t%-9lu\t%s",
+ fprintf(STDOUT, "creationDate\t%-9lu\t%s",
afs_printable_uint32_lu(a_xInfoP->creationDate),
ctime(&t));
t = a_xInfoP->accessDate;
- fprintf(STDOUT, "accessDate\t%-9lu\t%s",
+ fprintf(STDOUT, "accessDate\t%-9lu\t%s",
afs_printable_uint32_lu(a_xInfoP->accessDate),
ctime(&t));
t = a_xInfoP->updateDate;
- fprintf(STDOUT, "updateDate\t%-9lu\t%s",
+ fprintf(STDOUT, "updateDate\t%-9lu\t%s",
afs_printable_uint32_lu(a_xInfoP->updateDate),
ctime(&t));
t = a_xInfoP->backupDate;
- fprintf(STDOUT, "backupDate\t%-9lu\t%s",
+ fprintf(STDOUT, "backupDate\t%-9lu\t%s",
afs_printable_uint32_lu(a_xInfoP->backupDate),
ctime(&t));
t = a_xInfoP->copyDate;
- fprintf(STDOUT, "copyDate\t%-9lu\t%s",
+ fprintf(STDOUT, "copyDate\t%-9lu\t%s",
afs_printable_uint32_lu(a_xInfoP->copyDate),
ctime(&t));
-
+
fprintf(STDOUT, "diskused\t%u\n", a_xInfoP->size);
fprintf(STDOUT, "maxquota\t%u\n", a_xInfoP->maxquota);
if (pntr->status == VOK)
fprintf(STDOUT, "name\t\t%s\n", pntr->name);
- fprintf(STDOUT, "id\t\t%lu\n",
+ fprintf(STDOUT, "id\t\t%lu\n",
afs_printable_uint32_lu(pntr->volid));
fprintf(STDOUT, "serv\t\t%s\t%s\n", address, hostname);
fprintf(STDOUT, "part\t\t%s\n", pname);
fprintf(STDOUT, "status\t\tUNATTACHABLE\n");
return;
}
- fprintf(STDOUT, "backupID\t%lu\n",
+ fprintf(STDOUT, "backupID\t%lu\n",
afs_printable_uint32_lu(pntr->backupID));
- fprintf(STDOUT, "parentID\t%lu\n",
+ fprintf(STDOUT, "parentID\t%lu\n",
afs_printable_uint32_lu(pntr->parentID));
- fprintf(STDOUT, "cloneID\t\t%lu\n",
+ fprintf(STDOUT, "cloneID\t\t%lu\n",
afs_printable_uint32_lu(pntr->cloneID));
fprintf(STDOUT, "inUse\t\t%s\n", pntr->inUse ? "Y" : "N");
fprintf(STDOUT, "needsSalvaged\t%s\n", pntr->needsSalvaged ? "Y" : "N");
break;
}
t = pntr->creationDate;
- fprintf(STDOUT, "creationDate\t%-9lu\t%s",
+ fprintf(STDOUT, "creationDate\t%-9lu\t%s",
afs_printable_uint32_lu(pntr->creationDate),
ctime(&t));
t = pntr->accessDate;
- fprintf(STDOUT, "accessDate\t%-9lu\t%s",
+ fprintf(STDOUT, "accessDate\t%-9lu\t%s",
afs_printable_uint32_lu(pntr->accessDate),
ctime(&t));
t = pntr->updateDate;
- fprintf(STDOUT, "updateDate\t%-9lu\t%s",
+ fprintf(STDOUT, "updateDate\t%-9lu\t%s",
afs_printable_uint32_lu(pntr->updateDate),
ctime(&t));
t = pntr->backupDate;
- fprintf(STDOUT, "backupDate\t%-9lu\t%s",
+ fprintf(STDOUT, "backupDate\t%-9lu\t%s",
afs_printable_uint32_lu(pntr->backupDate),
ctime(&t));
t = pntr->copyDate;
- fprintf(STDOUT, "copyDate\t%-9lu\t%s",
+ fprintf(STDOUT, "copyDate\t%-9lu\t%s",
afs_printable_uint32_lu(pntr->copyDate),
ctime(&t));
- fprintf(STDOUT, "flags\t\t%#lx\t(Optional)\n",
+ fprintf(STDOUT, "flags\t\t%#lx\t(Optional)\n",
afs_printable_uint32_lu(pntr->flags));
fprintf(STDOUT, "diskused\t%u\n", pntr->size);
fprintf(STDOUT, "maxquota\t%u\n", pntr->maxquota);
- fprintf(STDOUT, "minquota\t%lu\t(Optional)\n",
+ fprintf(STDOUT, "minquota\t%lu\t(Optional)\n",
afs_printable_uint32_lu(pntr->spare0));
fprintf(STDOUT, "filecount\t%u\n", pntr->filecount);
fprintf(STDOUT, "dayUse\t\t%u\n", pntr->dayUse);
fprintf(STDOUT, "weekUse\t\t%lu\t(Optional)\n",
afs_printable_uint32_lu(pntr->spare1));
- fprintf(STDOUT, "spare2\t\t%lu\t(Optional)\n",
+ fprintf(STDOUT, "spare2\t\t%lu\t(Optional)\n",
afs_printable_uint32_lu(pntr->spare2));
- fprintf(STDOUT, "spare3\t\t%lu\t(Optional)\n",
+ fprintf(STDOUT, "spare3\t\t%lu\t(Optional)\n",
afs_printable_uint32_lu(pntr->spare3));
return;
}
} /*XDisplayVolumes2 */
-/* set <server> and <part> to the correct values depending on
+/* set <server> and <part> to the correct values depending on
* <voltype> and <entry> */
static void
GetServerAndPart(struct nvldbentry *entry, int voltype, afs_uint32 *server,
return E2BIG;
}
#if 0
- /*
+ /*
* In order that you be able to make clones of RO or BK, this
* check must be omitted.
*/
if (as->parms[6].items) flags |= RV_RDONLY;
- code =
+ code =
UV_CloneVolume(server, part, volid, cloneid, volname, flags);
if (code) {
if (as->parms[10].items) {
restoreflags |= RV_NODEL;
}
-
+
code =
UV_RestoreVolume2(aserver, apart, avolid, aparentid,
volid = vllist->volumeId[RWVOL];
vcode =
ubik_VL_ReleaseLock(cstruct, 0, volid, -1,
- LOCKREL_OPCODE | LOCKREL_AFSID |
+ LOCKREL_OPCODE | LOCKREL_AFSID |
LOCKREL_TIMESTAMP);
if (vcode) {
fprintf(STDERR, "Could not unlock entry for volume %s\n",
PrintInt64Size(sumFree));
fprintf(STDOUT,
"%s on %d partitions\n",
- PrintInt64Size(sumStorage),
+ PrintInt64Size(sumStorage),
sumPartitions);
}
return 0;
}
} else {
/* Play a trick here. If we are removing an address, ip1 will be -1
- * and ip2 will be the original address. This switch prevents an
+ * and ip2 will be the original address. This switch prevents an
* older revision vlserver from removing the IP address.
*/
remove = 1;
/* print out the list of all the server */
addrp = (afs_uint32 *) addrs->bulkaddrs_val;
for (i = 0; i < nentries; i++, addrp++) {
- /* If it is a multihomed address, then we will need to
+ /* If it is a multihomed address, then we will need to
* get the addresses for this multihomed server from
* the vlserver and print them.
*/
if (as->parms[0].items) {
/* -uuid */
if (afsUUID_from_string(as->parms[0].items->data, &askuuid) < 0) {
- fprintf(STDERR, "vos: invalid UUID '%s'\n",
+ fprintf(STDERR, "vos: invalid UUID '%s'\n",
as->parms[0].items->data);
exit(-1);
}
#ifdef AFS_AIX32_ENV
/*
- * The following signal action for AIX is necessary so that in case of a
- * crash (i.e. core is generated) we can include the user's data section
+ * The following signal action for AIX is necessary so that in case of a
+ * crash (i.e. core is generated) we can include the user's data section
* in the core dump. Unfortunately, by default, only a partial core is
* generated which, in many cases, isn't too useful.
*/
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return tc;
}
-static int
+static int
AFSVolCreateVolume_retry(struct rx_connection *z_conn,
afs_int32 partition, char *name, afs_int32 type,
afs_int32 parent, afs_uint32 *volid, afs_int32 *trans)
return code;
}
-static int
+static int
AFSVolTransCreate_retry(struct rx_connection *z_conn,
- afs_int32 volume, afs_int32 partition,
- afs_int32 flags, afs_int32 * trans)
+ afs_int32 volume, afs_int32 partition,
+ afs_int32 flags, afs_int32 * trans)
{
afs_int32 code;
int retries = 3;
for (i = 0; i < entry->nServers; i++) {
MapPartIdIntoName(entry->serverPartition[i], pname);
fprintf(STDOUT, " server %s partition %s ",
- noresolve ? afs_inet_ntoa_r(entry->serverNumber[i], hoststr) :
+ noresolve ? afs_inet_ntoa_r(entry->serverNumber[i], hoststr) :
hostutil_GetNameByINet(entry->serverNumber[i]), pname);
if (entry->serverFlags[i] & ITSRWVOL)
fprintf(STDOUT, "RW Site ");
aconn = UV_Bind(server, AFSCONF_VOLUMEPORT);
code = AFSVolPartitionInfo64(aconn, pname, partition);
if (code == RXGEN_OPCODE) {
- struct diskPartition *dpp =
+ struct diskPartition *dpp =
(struct diskPartition *)malloc(sizeof(struct diskPartition));
code = AFSVolPartitionInfo(aconn, pname, dpp);
if (!code) {
partition->minFree = dpp->minFree;
}
free(dpp);
- }
+ }
if (code) {
fprintf(STDERR, "Could not get information on partition %s\n", pname);
PrintError("", code);
/* set up the vldb entry for this volume */
strncpy(entry.name, aname, VOLSER_OLDMAXVOLNAME);
entry.nServers = 1;
- entry.serverNumber[0] = aserver; /* this should have another
+ entry.serverNumber[0] = aserver; /* this should have another
* level of indirection later */
- entry.serverPartition[0] = apart; /* this should also have
+ entry.serverPartition[0] = apart; /* this should also have
* another indirection level */
entry.flags = RW_EXISTS; /* this records that rw volume exists */
entry.serverFlags[0] = ITSRWVOL; /*this rep site has rw vol */
/* set up the vldb entry for this volume */
strncpy(entry.name, aname, VOLSER_OLDMAXVOLNAME);
entry.nServers = 1;
- entry.serverNumber[0] = aserver; /* this should have another
+ entry.serverNumber[0] = aserver; /* this should have another
* level of indirection later */
- entry.serverPartition[0] = apart; /* this should also have
+ entry.serverPartition[0] = apart; /* this should also have
* another indirection level */
entry.flags = RW_EXISTS; /* this records that rw volume exists */
entry.serverFlags[0] = ITSRWVOL; /*this rep site has rw vol */
}
/* Delete the volume <volid>on <aserver> <apart>
- * the physical entry gets removed from the vldb only if the ref count
+ * the physical entry gets removed from the vldb only if the ref count
* becomes zero
*/
int
else if (avolid == entry.volumeId[ROVOL]) {
/* Its a read-only volume, modify the VLDB entry. Check that the
* readonly volume is on the server/partition we asked to delete.
- * If flags does not have RO_EIXSTS set, then this may mean the RO
+ * If flags does not have RO_EIXSTS set, then this may mean the RO
* hasn't been released (and could exist in VLDB).
*/
if (!Lp_ROMatch(aserver, apart, &entry)) {
if (islocked) {
code =
ubik_VL_ReleaseLock(cstruct, 0, avolid, -1,
- (LOCKREL_OPCODE | LOCKREL_AFSID |
+ (LOCKREL_OPCODE | LOCKREL_AFSID |
LOCKREL_TIMESTAMP));
if (code) {
EPRINT1(code,
/* Move volume <afromvol> on <afromserver> <afrompart> to <atoserver>
* <atopart>. The operation is almost idempotent. The following
* flags are recognized:
- *
+ *
* RV_NOCLONE - don't use a copy clone
*/
}
/* From-info matches the vldb info about volid,
- * its ok start the move operation, the backup volume
- * on the old site is deleted in the process
+ * its ok start the move operation, the backup volume
+ * on the old site is deleted in the process
*/
if (afrompart == atopart) {
same = VLDB_IsSameAddrs(afromserver, atoserver, &error);
}
MapHostToNetwork(&entry);
- /* Delete either the volume on the source location or the target location.
+ /* Delete either the volume on the source location or the target location.
* If the vldb entry still points to the source location, then we know the
- * volume move didn't finish so we remove the volume from the target
+ * volume move didn't finish so we remove the volume from the target
* location. Otherwise, we remove the volume from the source location.
*/
if (Lp_Match(afromserver, afrompart, &entry)) { /* didn't move - delete target volume */
* <atopart>. The new volume is named by <atovolname>. The new volume
* has ID <atovolid> if that is nonzero; otherwise a new ID is allocated
* from the VLDB. the following flags are supported:
- *
+ *
* RV_RDONLY - target volume is RO
* RV_OFFLINE - leave target volume offline
* RV_CPINCR - do incremental dump if target exists
-/* Make a new backup of volume <avolid> on <aserver> and <apart>
- * if one already exists, update it
+/* Make a new backup of volume <avolid> on <aserver> and <apart>
+ * if one already exists, update it
*/
int
backupID = entry.volumeId[BACKVOL];
if (backupID == INVALID_BID) {
/* Get a backup volume id from the VLDB and update the vldb
- * entry with it.
+ * entry with it.
*/
code = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &backupID);
if (code) {
}
/* Now go ahead and try to clone the RW volume.
- * First start a transaction on the RW volume
+ * First start a transaction on the RW volume
*/
code = AFSVolTransCreate_retry(aconn, avolid, apart, ITBusy, &ttid);
if (code) {
goto bfail;
}
- /* Clone or reclone the volume, depending on whether the backup
+ /* Clone or reclone the volume, depending on whether the backup
* volume exists or not
*/
if (backexists) {
return error;
}
-/* Make a new clone of volume <avolid> on <aserver> and <apart>
+/* Make a new clone of volume <avolid> on <aserver> and <apart>
* using volume ID <acloneid>, or a new ID allocated from the VLDB.
* The new volume is named by <aname>, or by appending ".clone" to
* the existing name if <aname> is NULL. The following flags are
* supported:
- *
+ *
* RV_RDONLY - target volume is RO
* RV_OFFLINE - leave target volume offline
*/
}
/* Now go ahead and try to clone the RW volume.
- * First start a transaction on the RW volume
+ * First start a transaction on the RW volume
*/
code = AFSVolTransCreate_retry(aconn, avolid, apart, ITBusy, &ttid);
if (code) {
goto bfail;
}
- /* Clone or reclone the volume, depending on whether the backup
+ /* Clone or reclone the volume, depending on whether the backup
* volume exists or not
*/
if (backexists) {
#define ONERROR0(ec, es) if (ec) { fprintf(STDERR, (es)); error = (ec); goto rfail; }
#define ERROREXIT(ec) { error = (ec); goto rfail; }
-/* Get a "transaction" on this replica. Create the volume
+/* Get a "transaction" on this replica. Create the volume
* if necessary. Return the time from which a dump should
* be made (0 if it's a new volume)
*/
}
/* Otherwise, the transaction did succeed, so get the creation date of the
- * latest RO volume on the replication site
+ * latest RO volume on the replication site
*/
else {
VPRINT2("Updating existing ro volume %u on %s ...\n", volid,
noresolve ? afs_inet_ntoa_r(vldbEntryPtr->
- serverNumber[index], hoststr) :
+ serverNumber[index], hoststr) :
hostutil_GetNameByINet(vldbEntryPtr->serverNumber[index]));
code = AFSVolGetStatus(*connPtr, *transPtr, &tstatus);
* successfully.
* forceflag: Performs a full release.
*
- * Will create a clone from the RW, then dump the clone out to
+ * Will create a clone from the RW, then dump the clone out to
* the remaining replicas. If there is more than 1 RO sites,
* ensure that the VLDB says at least one RO is available all
* the time: Influences when we write back the VLDB entry.
ONERROR(tcode, cloneVolId, "Could not bring volume %u on line\n");
/* Sleep so that a client searching for an online volume won't
- * find the clone offline and then the next RO offline while the
+ * find the clone offline and then the next RO offline while the
* release brings the clone online and the next RO offline (race).
* There is a fix in the 3.4 client that does not need this sleep
* anymore, but we don't know what clients we have.
/* Get a Transaction on this replica. Get a new connection if
* necessary. Create the volume if necessary. Return the
* time from which the dump should be made (0 if it's a new
- * volume). Each volume might have a different time.
+ * volume). Each volume might have a different time.
*/
replicas[volcount].server.destHost =
ntohl(entry.serverNumber[vldbindex]);
/* have to clear dest. flags to ensure new vol goes online:
* because the restore (forwarded) operation copied
- * the V_inService(=0) flag over to the destination.
+ * the V_inService(=0) flag over to the destination.
*/
code = AFSVolSetFlags(toconns[m], replicas[m].trans, 0);
if (code) {
/* Dump the volume <afromvol> on <afromserver> and
* <afrompart> to <afilename> starting from <fromdate>.
* DumpFunction does the real work behind the scenes after
- * extracting parameters from the rock
+ * extracting parameters from the rock
*/
int
UV_DumpVolume(afs_uint32 afromvol, afs_uint32 afromserver, afs_int32 afrompart,
fromcall = rx_NewCall(fromconn);
VEPRINT1("Starting volume dump on volume %u...", afromvol);
- if (flags & VOLDUMPV2_OMITDIRS)
+ if (flags & VOLDUMPV2_OMITDIRS)
code = StartAFSVolDumpV2(fromcall, fromtid, fromdate, flags);
else
code = StartAFSVolDump(fromcall, fromtid, fromdate);
VEPRINT1("Dumping volume %u...", afromvol);
code = DumpFunction(fromcall, rock);
- if (code == RXGEN_OPCODE)
+ if (code == RXGEN_OPCODE)
goto error_exit;
EGOTO(error_exit, code, "Error while dumping volume \n");
VEDONE;
error_exit:
if (fromcall) {
code = rx_EndCall(fromcall, rxError);
- if (code && code != RXGEN_OPCODE)
+ if (code && code != RXGEN_OPCODE)
fprintf(STDERR, "Error in rx_EndCall\n");
if (code && !error)
error = code;
}
/* Clone the volume <afromvol> on <afromserver> and
- * <afrompart>, and then dump the clone volume to
+ * <afrompart>, and then dump the clone volume to
* <afilename> starting from <fromdate>.
* DumpFunction does the real work behind the scenes after
- * extracting parameters from the rock
+ * extracting parameters from the rock
*/
int
UV_DumpClonedVolume(afs_uint32 afromvol, afs_uint32 afromserver,
fromcall = rx_NewCall(fromconn);
VEPRINT1("Starting volume dump from cloned volume %u...", clonevol);
- if (flags & VOLDUMPV2_OMITDIRS)
+ if (flags & VOLDUMPV2_OMITDIRS)
code = StartAFSVolDumpV2(fromcall, clonetid, fromdate, flags);
else
code = StartAFSVolDump(fromcall, clonetid, fromdate);
/*
* Restore a volume <tovolid> <tovolname> on <toserver> <topart> from
* the dump file <afilename>. WriteData does all the real work
- * after extracting params from the rock
+ * after extracting params from the rock
*/
int
UV_RestoreVolume2(afs_uint32 toserver, afs_int32 topart, afs_uint32 tovolid,
struct volintInfo vinfo;
char partName[10];
char tovolreal[VOLSER_OLDMAXVOLNAME];
- afs_uint32 pvolid;
+ afs_uint32 pvolid;
afs_int32 temptid, pparentid;
int success;
struct nvldbentry entry, storeEntry;
if (!pparentid) pparentid = pvolid;
/* at this point we have a volume id to use/reuse for the volume to be restored */
strncpy(tovolreal, tovolname, VOLSER_OLDMAXVOLNAME);
-
+
if (strlen(tovolname) > (VOLSER_OLDMAXVOLNAME - 1)) {
EGOTO1(refail, VOLSERBADOP,
"The volume name %s exceeds the maximum limit of (VOLSER_OLDMAXVOLNAME -1 ) bytes\n",
fprintf(STDOUT, " done\n");
fflush(STDOUT);
if (success && (!reuseID || (flags & RV_FULLRST))) {
- /* Volume was restored on the file server, update the
+ /* Volume was restored on the file server, update the
* VLDB to reflect the change.
*/
vcode = VLDB_GetEntryByID(pvolid, voltype, &entry);
tempconn =
UV_Bind(entry.serverNumber[index],
AFSCONF_VOLUMEPORT);
-
+
MapPartIdIntoName(entry.serverPartition[index],
apartName);
VPRINT3
return 0;
}
-/*return a list of clones of the volumes specified by volPtrArray. Used by the
+/*return a list of clones of the volumes specified by volPtrArray. Used by the
backup system */
int
UV_GenerateVolumeClones(afs_uint32 aserver, afs_int32 apart,
}
/* CheckVolume()
- * Given a volume we read from a partition, check if it is
+ * Given a volume we read from a partition, check if it is
* represented in the VLDB correctly.
- *
+ *
* The VLDB is looked up by the RW volume id (not its name).
* The RW contains the true name of the volume (BK and RO set
* the name in the VLDB only on creation of the VLDB entry).
* We want rules strict enough that when we check all volumes
* on one partition, it does not need to be done again. IE:
- * two volumes on different partitions won't constantly
+ * two volumes on different partitions won't constantly
* change a VLDB entry away from what the other set.
- * For RW and BK volumes, we will always check the VLDB to see
+ * For RW and BK volumes, we will always check the VLDB to see
* if the two exist on the server/partition. May seem redundant,
* but this is an easy check of the VLDB. IE: if the VLDB entry
* says the BK exists but no BK volume is there, we will detect
char pname[10];
int pass = 0, islocked = 0, createentry, addvolume, modified, mod, doit = 1;
afs_uint32 rwvolid;
- char hoststr[16];
+ char hoststr[16];
if (modentry) {
if (*modentry == 1)
fprintf(STDERR,
" VLDB reports RW volume %lu exists on %s %s\n",
(unsigned long)rwvolid,
- noresolve ?
+ noresolve ?
afs_inet_ntoa_r(entry.serverNumber[idx], hoststr) :
hostutil_GetNameByINet(entry.
serverNumber[idx]),
fprintf(STDERR,
" VLDB reports its RW volume %lu exists on %s %s\n",
(unsigned long)rwvolid,
- noresolve ?
+ noresolve ?
afs_inet_ntoa_r(aserver, hoststr) :
hostutil_GetNameByINet(aserver),
pname);
else if (volumeinfo->type == ROVOL) { /* A RO volume */
if (volumeinfo->volid == entry.volumeId[ROVOL]) {
- /* This is a quick check to see if the RO entry exists in the
+ /* This is a quick check to see if the RO entry exists in the
* VLDB so we avoid the CheckVldbRO() call (which checks if each
* RO volume listed in the VLDB exists).
*/
/* Turn verbose logging off and do our own verbose logging */
/* tverbose must be set before we call ERROR_EXIT() */
-
+
tverbose = verbose;
- if (flags & 2)
+ if (flags & 2)
tverbose = 1;
verbose = 0;
fprintf(STDOUT, "\n");
}
- /* Verify that all of the VLDB entries exist on the repective servers
+ /* Verify that all of the VLDB entries exist on the repective servers
* and partitions (this does not require that avolname be a volume ID).
* Equivalent to a syncserv.
*/
} /* thru all partitions */
if (flags & 2) {
- VPRINT3("Total entries: %u, Failed to process %d, Would change %d\n",
+ VPRINT3("Total entries: %u, Failed to process %d, Would change %d\n",
tentries, failures, modifications);
} else {
- VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n",
+ VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n",
tentries, failures, modifications);
}
*modified = 0;
/* Check to see if the RO volumes exist and set the RO_EXISTS
- * flag accordingly.
+ * flag accordingly.
*/
for (idx = 0; idx < entry->nServers; idx++) {
if (!(entry->serverFlags[idx] & ITSROVOL)) {
int pass = 0, doit=1;
if (modified) {
- if (*modified == 1)
+ if (*modified == 1)
doit = 0;
*modified = 0;
}
if (mod)
modentry++;
- /* The VLDB entry has been updated. If it as been modified, then
+ /* The VLDB entry has been updated. If it as been modified, then
* write the entry back out the the VLDB.
*/
if (modentry && doit) {
struct nvldbentry *vlentry;
afs_int32 si, nsi, j;
- if (flags & 2)
+ if (flags & 2)
verbose = 1;
aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
VPRINT3("Total entries: %u, Failed to process %d, Would change %d\n",
tentries, failures, modifications);
} else {
- VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n",
+ VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n",
tentries, failures, modifications);
}
return error;
}
-/*rename volume <oldname> to <newname>, changing the names of the related
+/*rename volume <oldname> to <newname>, changing the names of the related
*readonly and backup volumes. This operation is also idempotent.
*salvager is capable of recovering from rename operation stopping halfway.
*to recover run syncserver on the affected machines,it will force renaming to completion. name clashes should have been detected before calling this proc */
goto rvfail;
}
VPRINT1("Recorded the new name %s in VLDB\n", newname);
- /*at this stage the intent to rename is recorded in the vldb, as far as the vldb
+ /*at this stage the intent to rename is recorded in the vldb, as far as the vldb
* is concerned, oldname is lost */
if (entry->flags & RW_EXISTS) {
index = Lp_GetRwIndex(entry);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
return code;
}
-int
+int
VLDB_ReplaceEntry(afs_uint32 volid, afs_int32 voltype, struct nvldbentry *entryp, afs_int32 releasetype)
{
struct vldbentry oentry;
struct ubik_client **uclientp,
int (*secproc)(struct rx_securityClass *, afs_int32))
{
- return ugen_ClientInit(noAuthFlag, confDir, cellName, sauth, uclientp,
+ return ugen_ClientInit(noAuthFlag, confDir, cellName, sauth, uclientp,
secproc, "vsu_ClientInit", vsu_rxkad_level,
VLDB_MAXSERVERS, AFSCONF_VLDBSERVICE, 90,
0, 0, USER_SERVICE_ID);
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* meat of the program. We count the number of Cache Managers
* to watch, allocate enough space to remember all the connection
* info for them, then go for it.
- *
+ *
*
* Arguments:
* a_s : Ptr to the command line syntax descriptor.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* rxcall : Ptr to Rx call on which this request came in.
*
* Returns:
- * RXGEN_OPCODE (always).
+ * RXGEN_OPCODE (always).
*
* Environment:
* Nothing interesting.
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
- *
+ *
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
* meat of the program. We count the number of File Servers
* to watch, allocate enough space to remember all the connection
* info for them, then go for it.
- *
+ *
*
* Arguments:
* a_s : Ptr to the command line syntax descriptor.