Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SystemStart and BootStart start types #113

Merged
merged 4 commits into from
Dec 27, 2023
Merged

Conversation

kkent030315
Copy link
Contributor

@kkent030315 kkent030315 commented Dec 20, 2023

Added SystemStart (SERVICE_SYSTEM_START) and BootStart (SERVICE_BOOT_START) start types.
This change has been tested locally.


This change is Reviewable

@pronebird
Copy link
Contributor

Would be great to document that these two new constants are used for drivers to avoid confusion with a regular SERVICE_AUTO_START.

See: https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-createservicea

@kkent030315
Copy link
Contributor Author

Would be great to document that these two new constants are used for drivers to avoid confusion with a regular SERVICE_AUTO_START.

See: https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-createservicea

I've added more precise comments on them to avoid confusing with usermode service start types. 👍

Copy link
Member

@faern faern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good change. This will be a breaking change since we add variants to a public enum. I think we should mark this enum as #[non_exhaustive] to prevent that in the future.

@faern faern requested a review from dlon December 21, 2023 16:20
@kkent030315
Copy link
Contributor Author

Sounds like a good change. This will be a breaking change since we add variants to a public enum. I think we should mark this enum as #[non_exhaustive] to prevent that in the future.

@faern Thank you for the review. I've added the #[non_exhaustive] attribute for the backwards compatibility (81331bc).

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @kkent030315)


src/service.rs line 89 at r3 (raw file):

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(u32)]
#[non_exhaustive]

It looks like this actually is exhaustive now. So maybe this attribute is unnecessary.

@kkent030315
Copy link
Contributor Author

@dlon Thank you for the review. I've removed the #[non_exhaustive] in d450630.

@dlon dlon merged commit d6c175b into mullvad:main Dec 27, 2023
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants