Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
swmodd
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
Show more breadcrumbs
LCM
swmodd
Commits
a442de61
Commit
a442de61
authored
5 years ago
by
Amin Ben Ramdhane
Browse files
Options
Downloads
Patches
Plain Diff
swmod: enhancement
parent
38744aa7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
swmod.c
+3
-3
3 additions, 3 deletions
swmod.c
swmod_opkg.c
+1
-1
1 addition, 1 deletion
swmod_opkg.c
tools.c
+1
-1
1 addition, 1 deletion
tools.c
with
5 additions
and
5 deletions
swmod.c
+
3
−
3
View file @
a442de61
...
@@ -590,15 +590,15 @@ swmod_eu_list(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -590,15 +590,15 @@ swmod_eu_list(struct ubus_context *ctx, struct ubus_object *obj,
return
0
;
return
0
;
}
}
static
struct
ubus_method
swmod_object_methods
[]
=
{
static
const
struct
ubus_method
swmod_object_methods
[]
=
{
UBUS_METHOD_NOARG
(
"environment"
,
swmod_environment
),
UBUS_METHOD_NOARG
(
"environment"
,
swmod_environment
),
UBUS_METHOD_NOARG
(
"du_list"
,
swmod_du_list
),
UBUS_METHOD_NOARG
(
"eu_list"
,
swmod_eu_list
),
UBUS_METHOD
(
"install"
,
swmod_install
,
install_policy
),
UBUS_METHOD
(
"install"
,
swmod_install
,
install_policy
),
UBUS_METHOD
(
"remove"
,
swmod_remove
,
remove_policy
),
UBUS_METHOD
(
"remove"
,
swmod_remove
,
remove_policy
),
UBUS_METHOD
(
"du_install"
,
swmod_du_install
,
du_install_policy
),
UBUS_METHOD
(
"du_install"
,
swmod_du_install
,
du_install_policy
),
UBUS_METHOD
(
"du_update"
,
swmod_du_update
,
du_update_policy
),
UBUS_METHOD
(
"du_update"
,
swmod_du_update
,
du_update_policy
),
UBUS_METHOD
(
"du_uninstall"
,
swmod_du_uninstall
,
du_uninstall_policy
),
UBUS_METHOD
(
"du_uninstall"
,
swmod_du_uninstall
,
du_uninstall_policy
),
UBUS_METHOD_NOARG
(
"du_list"
,
swmod_du_list
),
UBUS_METHOD_NOARG
(
"eu_list"
,
swmod_eu_list
)
};
};
static
struct
ubus_object_type
swmod_object_type
=
UBUS_OBJECT_TYPE
(
"swmodules"
,
swmod_object_methods
);
static
struct
ubus_object_type
swmod_object_type
=
UBUS_OBJECT_TYPE
(
"swmodules"
,
swmod_object_methods
);
...
...
This diff is collapsed.
Click to expand it.
swmod_opkg.c
+
1
−
1
View file @
a442de61
...
@@ -75,7 +75,7 @@ static int swmod_host_system_install_remove_package(const char *package_path, in
...
@@ -75,7 +75,7 @@ static int swmod_host_system_install_remove_package(const char *package_path, in
int
swmod_install_remove_package
(
const
char
*
package_path
,
const
char
*
environment
,
int
action
)
int
swmod_install_remove_package
(
const
char
*
package_path
,
const
char
*
environment
,
int
action
)
{
{
if
(
environment
&&
(
strcmp
(
environment
,
HOST_SYSTEM
)
!=
0
))
if
(
environment
&&
*
environment
!=
'\0'
&&
(
strcmp
(
environment
,
HOST_SYSTEM
)
!=
0
))
return
swmod_lxc_install_remove_package
(
package_path
,
environment
,
action
);
return
swmod_lxc_install_remove_package
(
package_path
,
environment
,
action
);
return
swmod_host_system_install_remove_package
(
package_path
,
action
);
return
swmod_host_system_install_remove_package
(
package_path
,
action
);
...
...
This diff is collapsed.
Click to expand it.
tools.c
+
1
−
1
View file @
a442de61
...
@@ -69,7 +69,7 @@ void swmod_strncpy(char *dst, const char *src, size_t n)
...
@@ -69,7 +69,7 @@ void swmod_strncpy(char *dst, const char *src, size_t n)
char
*
generate_full_url
(
char
*
url
,
char
*
username
,
char
*
password
)
char
*
generate_full_url
(
char
*
url
,
char
*
username
,
char
*
password
)
{
{
if
(
!
username
&&
!
password
)
if
(
(
!
username
&&
!
password
)
||
*
username
==
'\0'
||
*
password
==
'\0'
)
return
url
;
return
url
;
static
char
buf
[
512
]
=
{
0
};
static
char
buf
[
512
]
=
{
0
};
...
...
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