Skip to content

Commit c4c8e5e

Browse files
committed
[DISKPART] Check for the noerr option first
1 parent 86ec64b commit c4c8e5e

File tree

5 files changed

+103
-39
lines changed

5 files changed

+103
-39
lines changed

base/system/diskpart/automount.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,16 +195,16 @@ automount_main(
195195

196196
DPRINT("Automount()\n");
197197

198-
#if 0
199198
for (i = 1; i < argc; i++)
200199
{
201200
if (_wcsicmp(argv[i], L"noerr") == 0)
202201
{
203202
/* noerr */
203+
#if 0
204204
bNoErr = TRUE;
205+
#endif
205206
}
206207
}
207-
#endif
208208

209209
for (i = 1; i < argc; i++)
210210
{
@@ -225,7 +225,7 @@ automount_main(
225225
}
226226
else if (_wcsicmp(argv[i], L"noerr") == 0)
227227
{
228-
/* already handled */
228+
/* noerr - Already handled above */
229229
}
230230
else
231231
{

base/system/diskpart/create.c

Lines changed: 70 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ CreateEfiPartition(
4343
return TRUE;
4444
}
4545

46+
for (i = 3; i < argc; i++)
47+
{
48+
if (_wcsicmp(argv[i], L"noerr") == 0)
49+
{
50+
/* noerr */
51+
DPRINT("NoErr\n", pszSuffix);
52+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
53+
#if 0
54+
bNoErr = TRUE;
55+
#endif
56+
}
57+
}
58+
4659
for (i = 3; i < argc; i++)
4760
{
4861
if (HasPrefix(argv[i], L"size=", &pszSuffix))
@@ -73,12 +86,7 @@ CreateEfiPartition(
7386
}
7487
else if (_wcsicmp(argv[i], L"noerr") == 0)
7588
{
76-
/* noerr */
77-
DPRINT("NoErr\n", pszSuffix);
78-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
79-
#if 0
80-
bNoErr = TRUE;
81-
#endif
89+
/* noerr - Already handled above */
8290
}
8391
else
8492
{
@@ -251,6 +259,19 @@ CreateExtendedPartition(
251259
ScanForUnpartitionedMbrDiskSpace(CurrentDisk);
252260
}
253261

262+
for (i = 3; i < argc; i++)
263+
{
264+
if (_wcsicmp(argv[i], L"noerr") == 0)
265+
{
266+
/* noerr */
267+
DPRINT("NoErr\n", pszSuffix);
268+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
269+
#if 0
270+
bNoErr = TRUE;
271+
#endif
272+
}
273+
}
274+
254275
for (i = 3; i < argc; i++)
255276
{
256277
if (HasPrefix(argv[i], L"size=", &pszSuffix))
@@ -290,12 +311,7 @@ CreateExtendedPartition(
290311
}
291312
else if (_wcsicmp(argv[i], L"noerr") == 0)
292313
{
293-
/* noerr */
294-
DPRINT("NoErr\n", pszSuffix);
295-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
296-
#if 0
297-
bNoErr = TRUE;
298-
#endif
314+
/* noerr - Already handled above */
299315
}
300316
else
301317
{
@@ -437,6 +453,19 @@ CreateLogicalPartition(
437453
return TRUE;
438454
}
439455

456+
for (i = 3; i < argc; i++)
457+
{
458+
if (_wcsicmp(argv[i], L"noerr") == 0)
459+
{
460+
/* noerr */
461+
DPRINT("NoErr\n", pszSuffix);
462+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
463+
#if 0
464+
bNoErr = TRUE;
465+
#endif
466+
}
467+
}
468+
440469
for (i = 3; i < argc; i++)
441470
{
442471
if (HasPrefix(argv[i], L"size=", &pszSuffix))
@@ -498,12 +527,7 @@ CreateLogicalPartition(
498527
}
499528
else if (_wcsicmp(argv[i], L"noerr") == 0)
500529
{
501-
/* noerr */
502-
DPRINT("NoErr\n", pszSuffix);
503-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
504-
#if 0
505-
bNoErr = TRUE;
506-
#endif
530+
/* noerr - Already handled above */
507531
}
508532
else
509533
{
@@ -638,6 +662,19 @@ CreateMsrPartition(
638662
return TRUE;
639663
}
640664

665+
for (i = 3; i < argc; i++)
666+
{
667+
if (_wcsicmp(argv[i], L"noerr") == 0)
668+
{
669+
/* noerr */
670+
DPRINT("NoErr\n", pszSuffix);
671+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
672+
#if 0
673+
bNoErr = TRUE;
674+
#endif
675+
}
676+
}
677+
641678
for (i = 3; i < argc; i++)
642679
{
643680
if (HasPrefix(argv[i], L"size=", &pszSuffix))
@@ -668,12 +705,7 @@ CreateMsrPartition(
668705
}
669706
else if (_wcsicmp(argv[i], L"noerr") == 0)
670707
{
671-
/* noerr */
672-
DPRINT("NoErr\n", pszSuffix);
673-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
674-
#if 0
675-
bNoErr = TRUE;
676-
#endif
708+
/* noerr - Already handled above */
677709
}
678710
else
679711
{
@@ -1099,6 +1131,19 @@ CreatePrimaryPartition(
10991131
ScanForUnpartitionedMbrDiskSpace(CurrentDisk);
11001132
}
11011133

1134+
for (i = 3; i < argc; i++)
1135+
{
1136+
if (_wcsicmp(argv[i], L"noerr") == 0)
1137+
{
1138+
/* noerr */
1139+
DPRINT("NoErr\n", pszSuffix);
1140+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
1141+
#if 0
1142+
bNoErr = TRUE;
1143+
#endif
1144+
}
1145+
}
1146+
11021147
for (i = 3; i < argc; i++)
11031148
{
11041149
if (HasPrefix(argv[i], L"size=", &pszSuffix))
@@ -1144,12 +1189,7 @@ CreatePrimaryPartition(
11441189
}
11451190
else if (_wcsicmp(argv[i], L"noerr") == 0)
11461191
{
1147-
/* noerr */
1148-
DPRINT("NoErr\n", pszSuffix);
1149-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
1150-
#if 0
1151-
bNoErr = TRUE;
1152-
#endif
1192+
/* noerr - Alread handled above */
11531193
}
11541194
else
11551195
{

base/system/diskpart/delete.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ DeletePartition(
303303
bNoErr = TRUE;
304304
#endif
305305
}
306+
}
307+
308+
for (i = 2; i < argc; i++)
309+
{
310+
if (_wcsicmp(argv[i], L"noerr") == 0)
311+
{
312+
/* noerr - Already handled above */
313+
}
306314
else if (_wcsicmp(argv[i], L"override") == 0)
307315
{
308316
/* override */

base/system/diskpart/setid.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ setid_main(
3535
return TRUE;
3636
}
3737

38+
for (i = 1; i < argc; i++)
39+
{
40+
if (_wcsicmp(argv[i], L"noerr") == 0)
41+
{
42+
/* noerr */
43+
DPRINT("NOERR\n");
44+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
45+
}
46+
}
47+
3848
for (i = 1; i < argc; i++)
3949
{
4050
if (HasPrefix(argv[i], L"id=", &pszSuffix))
@@ -45,9 +55,7 @@ setid_main(
4555
}
4656
else if (_wcsicmp(argv[i], L"noerr") == 0)
4757
{
48-
/* noerr */
49-
DPRINT("NOERR\n");
50-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
58+
/* noerr - Already handled above */
5159
}
5260
else if (_wcsicmp(argv[i], L"override") == 0)
5361
{

base/system/diskpart/uniqueid.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ UniqueIdDisk(
4949
return TRUE;
5050
}
5151

52+
for (i = 1; i < argc; i++)
53+
{
54+
if (_wcsicmp(argv[i], L"noerr") == 0)
55+
{
56+
/* noerr */
57+
DPRINT("NOERR\n");
58+
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
59+
}
60+
}
61+
5262
for (i = 1; i < argc; i++)
5363
{
5464
if (HasPrefix(argv[2], L"id=", &pszSuffix))
@@ -59,9 +69,7 @@ UniqueIdDisk(
5969
}
6070
else if (_wcsicmp(argv[i], L"noerr") == 0)
6171
{
62-
/* noerr */
63-
DPRINT("NOERR\n");
64-
ConPuts(StdOut, L"The NOERR option is not supported yet!\n");
72+
/* noerr - Already handled above */
6573
}
6674
else
6775
{

0 commit comments

Comments
 (0)