Skip to content

Commit

Permalink
RHEL-69079: broken style fix for vioserial driver
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Chulak <[email protected]>
  • Loading branch information
Jedoku committed Jan 8, 2025
1 parent c04c47d commit 2ccbe9b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 94 deletions.
5 changes: 3 additions & 2 deletions vioserial/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ _cdecl wmain(__in ULONG argc, __in_ecount(argc) PWCHAR argv[])
while (!stoptest)
{
ch = getchar();
while (getchar() != '\n')
;
// clang-format off
while (getchar() != '\n');
// clang-format on
switch (ch)
{
case 'i':
Expand Down
5 changes: 3 additions & 2 deletions vioserial/libtestapp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ VOID NotificationTest(UINT id)
{
int test_data = 5;
RegisterNotification(port, NotificationTestFunction, (PVOID)&test_data);
while (getchar() != 'q')
;
// clang-format off
while (getchar() != 'q');
// clang-format on
ClosePort(port);
return;
}
Expand Down
113 changes: 23 additions & 90 deletions vioserial/libtestsvc/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,97 +3,30 @@
extern LPWSTR ServiceName;
extern CService srvc;

static struct ErrEntry
{
// clang-format off
static struct ErrEntry {
int code;
const char *msg;
} ErrList[] = {
{0, "No error"},
{1055,
"The service "
"database is "
"locked."},
{1056,
"An instance of "
"the service is "
"already "
"running."},
{1060,
"The service does "
"not exist as an "
"installed "
"service."},
{1061,
"The service "
"cannot accept "
"control messages "
"at this time."},
{1062,
"The service has "
"not been "
"started."},
{1063,
"The service "
"process could "
"not connect to "
"the service "
"controller."},
{1064,
"An exception "
"occurred in the "
"service when "
"handling the "
"control "
"request."},
{1065,
"The database "
"specified does "
"not exist."},
{1066,
"The service has "
"returned a "
"service-specific "
"error code."},
{1067,
"The process "
"terminated "
"unexpectedly."},
{1068,
"The dependency "
"service or group "
"failed to "
"start."},
{1069,
"The service did "
"not start due to "
"a logon "
"failure."},
{1070,
"After starting, "
"the service hung "
"in a "
"start-pending "
"state."},
{1071,
"The specified "
"service database "
"lock is "
"invalid."},
{1072,
"The service "
"marked for "
"deletion."},
{1073,
"The service "
"already exists."},
{1078,
"The name is "
"already in use "
"as either a "
"service name or "
"a service "
"display name."},
};
const char* msg;
} ErrList[] = {{ 0, "No error" },
{ 1055, "The service database is locked." },
{ 1056, "An instance of the service is already running." },
{ 1060, "The service does not exist as an installed service." },
{ 1061, "The service cannot accept control messages at this time." },
{ 1062, "The service has not been started." },
{ 1063, "The service process could not connect to the service controller." },
{ 1064, "An exception occurred in the service when handling the control request." },
{ 1065, "The database specified does not exist." },
{ 1066, "The service has returned a service-specific error code." },
{ 1067, "The process terminated unexpectedly." },
{ 1068, "The dependency service or group failed to start." },
{ 1069, "The service did not start due to a logon failure." },
{ 1070, "After starting, the service hung in a start-pending state." },
{ 1071, "The specified service database lock is invalid." },
{ 1072, "The service marked for deletion." },
{ 1073, "The service already exists." },
{ 1078, "The name is already in use as either a service name or a service display name." },
};
// clang-format on

const int nErrList = sizeof(ErrList) / sizeof(ErrEntry);

Expand Down

0 comments on commit 2ccbe9b

Please sign in to comment.