Changeset da680b4b in mainline for uspace/srv/volsrv/part.c
- Timestamp:
- 2018-07-06T17:18:28Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6419c6e
- Parents:
- 9ba040a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/volsrv/part.c
r9ba040a rda680b4b 256 256 } 257 257 258 /** Determine if partition is allowed to be mounted by default. 259 * 260 * @param part Partition 261 * @return @c true iff partition is allowed to be mounted by default 262 */ 263 static bool vol_part_allow_mount_by_def(vol_part_t *part) 264 { 265 /* CDFS is safe to mount (after all, it is read-only) */ 266 if (part->pcnt == vpc_fs && part->fstype == fs_cdfs) 267 return true; 268 269 /* For other file systems disallow mounting from ATA hard drive */ 270 if (str_str(part->svc_name, "\\ata-c") != NULL) 271 return false; 272 273 /* Allow otherwise (e.g. USB mass storage) */ 274 return true; 275 } 276 258 277 static errno_t vol_part_mount(vol_part_t *part) 259 278 { … … 265 284 /* Don't mount nameless volumes */ 266 285 log_msg(LOG_DEFAULT, LVL_NOTE, "Not mounting nameless partition."); 286 return EOK; 287 } 288 289 if (!vol_part_allow_mount_by_def(part)) { 290 /* Don't mount partition by default */ 291 log_msg(LOG_DEFAULT, LVL_NOTE, "Not mounting per default policy."); 267 292 return EOK; 268 293 }
Note:
See TracChangeset
for help on using the changeset viewer.