tree-wide: remove some dead code (#35137)
This commit is contained in:
@@ -276,7 +276,6 @@ static int vl_method_mount_image(
|
||||
Hashmap **polkit_registry = ASSERT_PTR(userdata);
|
||||
_cleanup_free_ char *ps = NULL;
|
||||
bool image_is_trusted = false;
|
||||
uid_t peer_uid;
|
||||
int r;
|
||||
|
||||
assert(link);
|
||||
@@ -284,10 +283,6 @@ static int vl_method_mount_image(
|
||||
|
||||
sd_json_variant_sensitive(parameters); /* might contain passwords */
|
||||
|
||||
r = sd_varlink_get_peer_uid(link, &peer_uid);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to get client UID: %m");
|
||||
|
||||
r = sd_varlink_dispatch(link, parameters, dispatch_table, &p);
|
||||
if (r != 0)
|
||||
return r;
|
||||
@@ -527,17 +522,13 @@ static int vl_method_mount_image(
|
||||
|
||||
loop_device_relinquish(loop);
|
||||
|
||||
r = sd_varlink_replybo(
|
||||
return sd_varlink_replybo(
|
||||
link,
|
||||
SD_JSON_BUILD_PAIR("partitions", SD_JSON_BUILD_VARIANT(aj)),
|
||||
SD_JSON_BUILD_PAIR("imagePolicy", SD_JSON_BUILD_STRING(ps)),
|
||||
SD_JSON_BUILD_PAIR("imageSize", SD_JSON_BUILD_INTEGER(di->image_size)),
|
||||
SD_JSON_BUILD_PAIR("sectorSize", SD_JSON_BUILD_INTEGER(di->sector_size)),
|
||||
SD_JSON_BUILD_PAIR_CONDITION(!sd_id128_is_null(di->image_uuid), "imageUuid", SD_JSON_BUILD_UUID(di->image_uuid)));
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static int process_connection(sd_varlink_server *server, int _fd) {
|
||||
|
||||
+9
-9
@@ -5106,15 +5106,15 @@ static int load_oci_bundle(void) {
|
||||
}
|
||||
|
||||
static int run_container(
|
||||
DissectedImage *dissected_image,
|
||||
int userns_fd,
|
||||
FDSet *fds,
|
||||
char veth_name[IFNAMSIZ],
|
||||
bool *veth_created,
|
||||
struct ExposeArgs *expose_args,
|
||||
int *master,
|
||||
pid_t *pid,
|
||||
int *ret) {
|
||||
DissectedImage *dissected_image,
|
||||
int userns_fd,
|
||||
FDSet *fds,
|
||||
char veth_name[IFNAMSIZ],
|
||||
bool *veth_created,
|
||||
struct ExposeArgs *expose_args,
|
||||
int *master,
|
||||
pid_t *pid,
|
||||
int *ret) {
|
||||
|
||||
static const struct sigaction sa = {
|
||||
.sa_handler = nop_signal_handler,
|
||||
|
||||
@@ -4271,7 +4271,6 @@ int mountfsd_mount_image(
|
||||
_cleanup_close_ int image_fd = -EBADF;
|
||||
_cleanup_(sd_varlink_unrefp) sd_varlink *vl = NULL;
|
||||
_cleanup_free_ char *ps = NULL;
|
||||
unsigned max_fd = UINT_MAX;
|
||||
const char *error_id;
|
||||
int r;
|
||||
|
||||
@@ -4365,9 +4364,6 @@ int mountfsd_mount_image(
|
||||
return log_error_errno(r, "Failed to parse partition data: %m");
|
||||
|
||||
if (pp.fsmount_fd_idx != UINT_MAX) {
|
||||
if (max_fd == UINT_MAX || pp.fsmount_fd_idx > max_fd)
|
||||
max_fd = pp.fsmount_fd_idx;
|
||||
|
||||
fsmount_fd = sd_varlink_take_fd(vl, pp.fsmount_fd_idx);
|
||||
if (fsmount_fd < 0)
|
||||
return fsmount_fd;
|
||||
|
||||
Reference in New Issue
Block a user