/*********************************************************
- * Copyright (C) 2007-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2007-2019, 2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
{
char *machineID;
char *executionID;
- char *lockType;
+ const char *lockType;
char *locationChecksum;
char *memberName;
unsigned int lamportNumber;
typedef struct parse_table
{
- int type;
- char *name;
- void *valuePtr;
+ int type;
+ const char *name;
+ void *valuePtr;
} ParseTable;
/*
#if !defined(VMM)
typedef struct {
- int32 legalLevelValue;
- char *legalName;
- char *levelIdStr;
+ int32 legalLevelValue;
+ const char *legalName;
+ const char *levelIdStr;
} LogLevelData;
const LogLevelData *
/*********************************************************
- * Copyright (C) 2009-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2009-2019, 2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
typedef struct MXUserHisto MXUserHisto;
-MXUserHisto *MXUserHistoSetUp(char *typeName,
+MXUserHisto *MXUserHistoSetUp(const char *typeName,
uint64 minValue,
uint32 decades);
void
MXUserBasicStatsSetUp(MXUserBasicStats *stats,
- char *typeName);
+ const char *typeName);
void
MXUserBasicStatsSample(MXUserBasicStats *stats,
/*********************************************************
- * Copyright (C) 2010-2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 2010-2019, 2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
*/
MXUserHisto *
-MXUserHistoSetUp(char *typeName, // type (name) of histogram
- uint64 minValue, // IN: ns; 1, 10, 100, 1000...
- uint32 decades) // IN: decimal decades to cover from min
+MXUserHistoSetUp(const char *typeName, // type (name) of histogram
+ uint64 minValue, // IN: ns; 1, 10, 100, 1000...
+ uint32 decades) // IN: decimal decades to cover from min
{
MXUserHisto *histo;
void
MXUserBasicStatsSetUp(MXUserBasicStats *stats, // IN/OUT:
- char *typeName) // IN:
+ const char *typeName) // IN:
{
stats->typeName = Util_SafeStrdup(typeName);
stats->numSamples = 0;
static INLINE void
MXUserForceHisto(Atomic_Ptr *histoPtr, // IN/OUT:
- char *typeName, // IN:
+ const char *typeName, // IN:
uint64 minValue, // IN:
uint32 decades) // IN:
{
/*********************************************************
- * Copyright (C) 1998-2017,2019 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017,2019,2021 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
return ret;
#elif defined(USE_ICONV)
- static char *cachedCodeset;
+ static const char *cachedCodeset;
/*
* Mirror GLib behavior:
* the first entry when converting to/from UTF-8.
*/
- if (!cachedCodeset) {
+ if (cachedCodeset == NULL) {
char *gFilenameEncoding = getenv("G_FILENAME_ENCODING");
- if (gFilenameEncoding && *gFilenameEncoding) {
+ if (gFilenameEncoding != NULL && *gFilenameEncoding != '\0') {
char *p;
gFilenameEncoding = Util_SafeStrdup(gFilenameEncoding);
p = strchr(gFilenameEncoding, ',');
- if (p) {
+ if (p != NULL) {
*p = '\0';
}
if (!strcmp(gFilenameEncoding, "@locale")) {
*/
typedef struct {
- char *name;
- char value[MAX_DETAILED_FIELD_LEN];
+ const char *name;
+ char value[MAX_DETAILED_FIELD_LEN];
} DetailedDataField;
/* Must be sorted. Keep in same ordering as detailedDataFields */
#if !defined(USING_AUTOCONF) || defined(HAVE_SYS_VFS_H)
#include <sys/vfs.h>
#endif
-#if !defined(sun) && !defined __ANDROID__ && (!defined(USING_AUTOCONF) || (defined(HAVE_SYS_IO_H) && defined(HAVE_SYS_SYSINFO_H)))
+#if !defined(sun) && !defined __ANDROID__ && (!defined(USING_AUTOCONF) || \
+ (defined(HAVE_SYS_IO_H) && \
+ defined(HAVE_SYS_SYSINFO_H)))
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
#include <sys/io.h>
#else
#if !defined(__APPLE__) && !defined(VMX86_SERVER) && !defined(USERWORLD)
typedef struct {
- char *name;
- char *scanString;
+ const char *name;
+ const char *scanString;
} DistroNameScan;
static const DistroNameScan lsbFields[] = {
};
typedef struct {
- char *name;
- char *filename;
+ const char *name;
+ const char *filename;
} DistroInfo;
/*
size_t distroShortSize) // IN:
{
char generic[128];
- char *distroOut = NULL;
- char *distroShortOut = NULL;
+ const char *distroOut = NULL;
+ const char *distroShortOut = NULL;
int majorVersion = Hostinfo_OSVersion(0);
int minorVersion = Hostinfo_OSVersion(1);
*/
static char *
-HostinfoGetCpuInfo(int nCpu, // IN:
- char *name) // IN:
+HostinfoGetCpuInfo(int nCpu, // IN:
+ const char *name) // IN:
{
FILE *f;
char *line;
static Bool
HostinfoFindEntry(char *buffer, // IN: Buffer
- char *string, // IN: String sought
+ const char *string, // IN: String sought
unsigned int *value) // OUT: Value
{
char *p = strstr(buffer, string);
*/
static Bool
-HostinfoGetMemInfo(char *name, // IN:
- unsigned int *value) // OUT:
+HostinfoGetMemInfo(const char *name, // IN:
+ unsigned int *value) // OUT:
{
size_t len;
char buffer[4096];