Add device hook to allow incomplete fstab file
This commit is contained in:
		
							
								
								
									
										6
									
								
								hooks.h
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								hooks.h
									
									
									
									
									
								
							@@ -32,6 +32,10 @@ void mrom_hook_before_fb_close(void);
 | 
			
		||||
void tramp_hook_before_device_init(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if MR_DEVICE_HOOKS >= 4
 | 
			
		||||
int mrom_hook_allow_incomplete_fstab(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* MR_DEVICE_HOOKS */
 | 
			
		||||
 | 
			
		||||
#endif /* MR_DEVICE_HOOKS_H */
 | 
			
		||||
#endif /* MR_DEVICE_HOOKS_H */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								multirom.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								multirom.c
									
									
									
									
									
								
							@@ -1274,7 +1274,14 @@ int multirom_process_android_fstab(char *fstab_name, int has_fw, struct fstab_pa
 | 
			
		||||
        goto exit;
 | 
			
		||||
 | 
			
		||||
    if(fstab_disable_part(tab, "/system") || fstab_disable_part(tab, "/data") || fstab_disable_part(tab, "/cache"))
 | 
			
		||||
        goto exit;
 | 
			
		||||
    {
 | 
			
		||||
#if MR_DEVICE_HOOKS >= 4
 | 
			
		||||
        if(!mrom_hook_allow_incomplete_fstab())
 | 
			
		||||
#endif
 | 
			
		||||
        {
 | 
			
		||||
            goto exit;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if(has_fw)
 | 
			
		||||
    {
 | 
			
		||||
@@ -1287,7 +1294,7 @@ int multirom_process_android_fstab(char *fstab_name, int has_fw, struct fstab_pa
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Android considers empty fstab invalid
 | 
			
		||||
    if(tab->count == 3 + has_fw)
 | 
			
		||||
    if(tab->count <= 3 + has_fw)
 | 
			
		||||
    {
 | 
			
		||||
        INFO("fstab would be empty, adding dummy line\n");
 | 
			
		||||
        fstab_add_part(tab, "tmpfs", "/dummy_tmpfs", "tmpfs", "ro,nosuid,nodev", "defaults");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user