Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mdmngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IOPSYS
mdmngr
Commits
e6b5d705
Commit
e6b5d705
authored
7 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
small fixes
parent
e6a08bc2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dongle.c
+1
-1
1 addition, 1 deletion
dongle.c
dongle_infrastructure.c
+3
-4
3 additions, 4 deletions
dongle_infrastructure.c
dongle_infrastructure.h
+2
-2
2 additions, 2 deletions
dongle_infrastructure.h
with
6 additions
and
7 deletions
dongle.c
+
1
−
1
View file @
e6b5d705
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
struct
ubus_context
*
ctx
;
struct
ubus_context
*
ctx
;
int
debug
;
int
debug
;
struct
uloop_timeout
timeout
=
{
.
cb
=
status
};
struct
uloop_timeout
timeout
=
{
.
cb
=
devices_
status
};
static
struct
option
long_options
[]
=
{
static
struct
option
long_options
[]
=
{
{
"debug"
,
required_argument
,
NULL
,
'd'
},
{
"debug"
,
required_argument
,
NULL
,
'd'
},
...
...
This diff is collapsed.
Click to expand it.
dongle_infrastructure.c
+
3
−
4
View file @
e6b5d705
...
@@ -58,10 +58,9 @@ int add_device(char *name, char *ip)
...
@@ -58,10 +58,9 @@ int add_device(char *name, char *ip)
{
{
struct
device
*
dev
;
struct
device
*
dev
;
/* Either do this here, or send an ENUM {FIND, FIND_INCREMENT} flag to search? */
dev
=
search_list
(
name
);
dev
=
search_list
(
name
);
if
(
dev
)
{
if
(
dev
)
{
dev
->
current_pass
=
true
;
dev
->
present
=
true
;
goto
fail
;
goto
fail
;
}
}
dev
=
malloc
(
sizeof
(
struct
device
));
dev
=
malloc
(
sizeof
(
struct
device
));
...
@@ -71,7 +70,7 @@ int add_device(char *name, char *ip)
...
@@ -71,7 +70,7 @@ int add_device(char *name, char *ip)
goto
fail
;
goto
fail
;
}
}
dev
->
current_pass
=
true
;
dev
->
present
=
true
;
dev
->
name
=
name
;
dev
->
name
=
name
;
dev
->
ip
=
ip
;
dev
->
ip
=
ip
;
list_add
(
&
dev
->
list
,
&
devices
);
list_add
(
&
dev
->
list
,
&
devices
);
...
@@ -188,7 +187,7 @@ int get_devices(void)
...
@@ -188,7 +187,7 @@ int get_devices(void)
}
}
while
((
de
=
readdir
(
dr
))
!=
NULL
)
{
while
((
de
=
readdir
(
dr
))
!=
NULL
)
{
if
(
strcmp
(
de
->
d_name
,
"."
)
==
0
||
strcmp
(
de
->
d_name
,
".."
)
==
0
)
if
(
strcmp
(
de
->
d_name
,
"."
)
==
0
||
strcmp
(
de
->
d_name
,
".."
)
==
0
)
continue
;
continue
;
if
(
fstatat
(
dirfd
(
dr
),
de
->
d_name
,
&
st
,
0
)
<
0
)
{
if
(
fstatat
(
dirfd
(
dr
),
de
->
d_name
,
&
st
,
0
)
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
dongle_infrastructure.h
+
2
−
2
View file @
e6b5d705
...
@@ -12,9 +12,9 @@ struct device {
...
@@ -12,9 +12,9 @@ struct device {
int
expose_infrastructure_object
(
struct
ubus_context
*
ctx
);
int
expose_infrastructure_object
(
struct
ubus_context
*
ctx
);
int
get_devices
(
void
);
int
get_devices
(
void
);
int
status
(
struct
uloop_timeout
*
t
);
int
devices_
status
(
struct
uloop_timeout
*
t
);
char
*
get_device_ip
(
char
*
device_name
);
char
*
get_device_ip
(
char
*
device_name
);
int
find
_missing_devices
(
void
);
int
tag
_missing_devices
(
void
);
int
add_device
(
char
*
name
,
char
*
ip
);
int
add_device
(
char
*
name
,
char
*
ip
);
int
delete_device_by_name
(
char
*
name
);
int
delete_device_by_name
(
char
*
name
);
int
delete_device_by_obj
(
struct
device
*
dev
);
int
delete_device_by_obj
(
struct
device
*
dev
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment