diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-03-11 00:10:18 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-10 22:16:09 -0600 |
commit | 20c4d242f64f68fc89d72c364506fa7bd854904e (patch) | |
tree | 071a25a69b785242b121c54c88182d633fe5ad75 | |
parent | fullscreen: init floating on disable without size (diff) | |
download | sway-20c4d242f64f68fc89d72c364506fa7bd854904e.tar.gz sway-20c4d242f64f68fc89d72c364506fa7bd854904e.tar.zst sway-20c4d242f64f68fc89d72c364506fa7bd854904e.zip |
detect_proprietary: use strncmp
Only the main nvidia module needs to be blocked. Others such as
nvidiafb are benign and do not need to be blocked
-rw-r--r-- | sway/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/main.c b/sway/main.c index 22b72813..f3cc1bc8 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -91,7 +91,7 @@ void detect_proprietary(int allow_unsupported_gpu) { | |||
91 | char *line = NULL; | 91 | char *line = NULL; |
92 | size_t line_size = 0; | 92 | size_t line_size = 0; |
93 | while (getline(&line, &line_size, f) != -1) { | 93 | while (getline(&line, &line_size, f) != -1) { |
94 | if (strstr(line, "nvidia")) { | 94 | if (strncmp(line, "nvidia ", 7) == 0) { |
95 | if (allow_unsupported_gpu) { | 95 | if (allow_unsupported_gpu) { |
96 | sway_log(SWAY_ERROR, | 96 | sway_log(SWAY_ERROR, |
97 | "!!! Proprietary Nvidia drivers are in use !!!"); | 97 | "!!! Proprietary Nvidia drivers are in use !!!"); |