Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Fan-Control-Daemon
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CeRiAl
Fan-Control-Daemon
Commits
37847f39
Commit
37847f39
authored
Aug 22, 2012
by
Daniel Graziotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #15
parent
8ed60e90
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
mbpfan.c
src/mbpfan.c
+6
-4
No files found.
src/mbpfan.c
View file @
37847f39
...
...
@@ -135,15 +135,16 @@ void find_fans(t_sensors* sensors)
char
number
[
2
];
sprintf
(
number
,
"%d"
,
0
);
int
counter
=
0
;
int
n_sensors
=
0
;
int
n_fans
=
0
;
for
(
n_sensors
=
0
;
n_sensors
<
10
;
n_sensors
++
)
{
for
(
counter
=
0
;
counter
<
10
;
counter
++
)
{
path_output
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
path_min_size
);
path_output
[
0
]
=
'\0'
;
path_manual
=
(
char
*
)
malloc
(
sizeof
(
char
)
*
path_man_size
);
path_manual
[
0
]
=
'\0'
;
sprintf
(
number
,
"%d"
,
n_sensors
);
sprintf
(
number
,
"%d"
,
counter
);
strncat
(
path_output
,
path_begin
,
strlen
(
path_begin
)
);
strncat
(
path_output
,
number
,
strlen
(
number
)
);
...
...
@@ -165,14 +166,15 @@ void find_fans(t_sensors* sensors)
strcpy
(
tmp
->
fan_manual_path
,
path_manual
);
tmp
=
tmp
->
next
;
n_fans
++
;
n_sensors
++
;
fclose
(
file
);
}
}
if
(
verbose
)
{
printf
(
"Found %d
:
sensors and %d fans
\n
"
,
n_sensors
,
n_fans
);
printf
(
"Found %d sensors and %d fans
\n
"
,
n_sensors
,
n_fans
);
if
(
daemonize
)
{
syslog
(
LOG_INFO
,
"Found %d
:
sensors and %d fans"
,
n_sensors
,
n_fans
);
syslog
(
LOG_INFO
,
"Found %d sensors and %d fans"
,
n_sensors
,
n_fans
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment