1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
--- src/openseachest_util_options.c.orig 2023-04-12 16:13:25 UTC
+++ src/openseachest_util_options.c
@@ -112,12 +112,12 @@ void print_Elevated_Privileges_Text(void)
char* get_current_year(char *temp_year)
{
- size_t len = strlen(__DATE__);
+ size_t len = strlen("Jan 19 2038");
temp_year[4] = '\0';
- temp_year[3] = __DATE__[len - 1];
- temp_year[2] = __DATE__[len - 2];
- temp_year[1] = __DATE__[len - 3];
- temp_year[0] = __DATE__[len - 4];
+ temp_year[3] = "Jan 19 2038"[len - 1];
+ temp_year[2] = "Jan 19 2038"[len - 2];
+ temp_year[1] = "Jan 19 2038"[len - 3];
+ temp_year[0] = "Jan 19 2038"[len - 4];
return temp_year;
}
@@ -151,7 +151,7 @@ void openseachest_utility_Info(const char *utilityName
printf(" %s Version: %s-%s ", utilityName, buildVersion, seaCPublicVersion);
print_Architecture(architecture);
printf("\n");
- printf(" Build Date: %s\n", __DATE__);
+ printf(" Build Date: %s\n", "Jan 19 2038");
if (0 == strftime(currentTime, CURRENT_TIME_STRING_MAX_LENGTH, "%c", get_Localtime(&g_curTime, &utilTime)))
{
snprintf(currentTime, CURRENT_TIME_STRING_MAX_LENGTH, "Unable to get local time");
@@ -178,7 +178,7 @@ void utility_Full_Version_Info(const char *utilityName
printf("\topensea-common Version: %s\n", openseaCommonVersion);
printf("\topensea-transport Version: %" PRId32".%" PRId32".%" PRId32"\n", seaCPublicMajorVersion, seaCPublicMinorVersion, seaCPublicPatchVersion);
printf("\topensea-operations Version: %s\n", openseaOperationVersion);
- printf("\tBuild Date: %s\n", __DATE__);
+ printf("\tBuild Date: %s\n", "Jan 19 2038");
printf("\tCompiled Architecture: ");
print_Architecture(get_Compiled_Architecture());
printf("\n\tDetected Endianness: ");
@@ -227,58 +227,58 @@ void print_SeaChest_Util_Exit_Codes(int numberOfToolSp
void get_Scan_Flags(deviceScanFlags *scanFlags, char *optarg)
{
- if(strncmp("ata", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanATA = true;
- }
- else if (strlen(optarg) == 3 && strncmp("usb", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanUSB = true;
- }
- else if (strlen(optarg) == 4 && strncmp("scsi", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanSCSI = true;
- }
- else if (strlen(optarg) == 4 && strncmp("nvme", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanNVMe = true;
- }
- else if (strlen(optarg) == 4 && strncmp("raid", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanRAID = true;
- }
- else if (strlen(optarg) == 12 && strncmp("interfaceATA", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanInterfaceATA = true;
- }
- else if (strlen(optarg) == 12 && strncmp("interfaceUSB", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanInterfaceUSB = true;
- }
- else if (strlen(optarg) == 13 && strncmp("interfaceSCSI", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanInterfaceSCSI = true;
- }
- else if (strlen(optarg) == 13 && strncmp("interfaceNVME", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanInterfaceNVMe = true;
- }
- else if (strlen(optarg) == 2 && strncmp("sd", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanSD = true;
- }
- else if (strlen(optarg) == 6 && strncmp("sgtosd", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanSDandSG = true;
- }
- else if (strlen(optarg) == 10 && strncmp("ignoreCSMI", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanIgnoreCSMI = true;
- }
- else if (strlen(optarg) == 15 && strncmp("allowDuplicates", optarg, strlen(optarg)) == 0)
- {
- scanFlags->scanAllowDuplicateDevices = true;
- }
+ if(strncmp("ata", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanATA = true;
+ }
+ else if (strlen(optarg) == 3 && strncmp("usb", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanUSB = true;
+ }
+ else if (strlen(optarg) == 4 && strncmp("scsi", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanSCSI = true;
+ }
+ else if (strlen(optarg) == 4 && strncmp("nvme", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanNVMe = true;
+ }
+ else if (strlen(optarg) == 4 && strncmp("raid", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanRAID = true;
+ }
+ else if (strlen(optarg) == 12 && strncmp("interfaceATA", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanInterfaceATA = true;
+ }
+ else if (strlen(optarg) == 12 && strncmp("interfaceUSB", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanInterfaceUSB = true;
+ }
+ else if (strlen(optarg) == 13 && strncmp("interfaceSCSI", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanInterfaceSCSI = true;
+ }
+ else if (strlen(optarg) == 13 && strncmp("interfaceNVME", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanInterfaceNVMe = true;
+ }
+ else if (strlen(optarg) == 2 && strncmp("sd", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanSD = true;
+ }
+ else if (strlen(optarg) == 6 && strncmp("sgtosd", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanSDandSG = true;
+ }
+ else if (strlen(optarg) == 10 && strncmp("ignoreCSMI", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanIgnoreCSMI = true;
+ }
+ else if (strlen(optarg) == 15 && strncmp("allowDuplicates", optarg, strlen(optarg)) == 0)
+ {
+ scanFlags->scanAllowDuplicateDevices = true;
+ }
return;
}
@@ -4310,4 +4310,3 @@ void print_Persistent_Reservations_Preempt_Abort_Help(
printf("\t\t--%s option in order to specify the key to preempt.\n\n", PERSISTENT_RESERVATION_PREEMPT_LONG_OPT_STRING);
}
}
-
|