@@ -901,7 +901,7 @@ static int manager_assess_image(
901901
902902 r = btrfs_is_subvol_fd (fd );
903903 if (r < 0 )
904- return log_warning_errno (errno , "Failed to determine whether %s is a btrfs subvolume: %m" , path );
904+ return log_warning_errno (r , "Failed to determine whether %s is a btrfs subvolume: %m" , path );
905905 if (r > 0 )
906906 storage = USER_SUBVOLUME ;
907907 else {
@@ -1424,7 +1424,7 @@ static int manager_generate_key_pair(Manager *m) {
14241424 /* Write out public key (note that we only do that as a help to the user, we don't make use of this ever */
14251425 r = fopen_temporary ("/var/lib/systemd/home/local.public" , & fpublic , & temp_public );
14261426 if (r < 0 )
1427- return log_error_errno (errno , "Failed to open key file for writing: %m" );
1427+ return log_error_errno (r , "Failed to open key file for writing: %m" );
14281428
14291429 if (PEM_write_PUBKEY (fpublic , m -> private_key ) <= 0 )
14301430 return log_error_errno (SYNTHETIC_ERRNO (EIO ), "Failed to write public key." );
@@ -1438,7 +1438,7 @@ static int manager_generate_key_pair(Manager *m) {
14381438 /* Write out the private key (this actually writes out both private and public, OpenSSL is confusing) */
14391439 r = fopen_temporary ("/var/lib/systemd/home/local.private" , & fprivate , & temp_private );
14401440 if (r < 0 )
1441- return log_error_errno (errno , "Failed to open key file for writing: %m" );
1441+ return log_error_errno (r , "Failed to open key file for writing: %m" );
14421442
14431443 if (PEM_write_PrivateKey (fprivate , m -> private_key , NULL , NULL , 0 , NULL , 0 ) <= 0 )
14441444 return log_error_errno (SYNTHETIC_ERRNO (EIO ), "Failed to write private key pair." );
0 commit comments