Commit graph

5809 commits

Author SHA1 Message Date
Jean-Baptiste Queru
905ed1fbd3 am c1d80272: am 08da5c1f: Merge "vold: replace strsep by strtok_r"
* commit 'c1d80272b117cf837de93fadd8d456d89a203e2f':
  vold: replace strsep by strtok_r
2010-11-19 17:26:47 -08:00
Jean-Baptiste Queru
c1d80272b1 am 08da5c1f: Merge "vold: replace strsep by strtok_r"
* commit '08da5c1f17afefe3c9f4f4d4456c5757dede62e1':
  vold: replace strsep by strtok_r
2010-11-19 17:24:49 -08:00
Jean-Baptiste Queru
08da5c1f17 Merge "vold: replace strsep by strtok_r" 2010-11-19 17:20:39 -08:00
Jinho You
74ca25a716 vold: replace strsep by strtok_r
It permits more white spaces between words in vold.fstab.

Change-Id: I38250c3dcc860643e4f102e980fe844693a1451a
2010-11-19 17:01:48 -08:00
Jean-Baptiste Queru
2996451f77 am 1206e872: resolved conflicts for merge of 09f774b7 to gingerbread-plus-aosp
* commit '1206e872ce74aab253c39c3547bfaadc5e1f6011':
  vold: fix an offset one bug that makes partition 4 unusable
  vold: set state back to idle on formatting error
2010-11-19 10:25:51 -08:00
Jean-Baptiste Queru
1206e872ce resolved conflicts for merge of 09f774b7 to gingerbread-plus-aosp
Change-Id: I103db47198ad09783aa6539cde271df0fdb9c594
2010-11-19 10:20:37 -08:00
Jean-Baptiste Queru
09f774b7d3 Merge changes Ic8e18e61,I62c78eb8
* changes:
  vold: fix an offset one bug that makes partition 4 unusable
  vold: set state back to idle on formatting error
2010-11-17 18:24:33 -08:00
Chih-Wei Huang
def8f31683 vold: fix an offset one bug that makes partition 4 unusable
Change-Id: Ic8e18e6191ad7ee33162e36060b57a6802cf0883
2010-11-17 18:53:09 +08:00
Olivier Bailly
37dcda68d3 Add missing include headers for compilation on Intel target for Google TV.
Change-Id: I9f71b5e871671d1d64ad37f78a8944653409b8e1
2010-11-16 10:41:53 -08:00
Chih-Wei Huang
64382de1f9 vold: set state back to idle on formatting error
On formatting error due to some reasons, the state is left at
Formatting, therefore the user is unable to mount the sdcard
again. The patch sets the state to Idle no matter formatting
error or not.

Change-Id: I62c78eb8299cc397ee5cc442890f8b3dbf09425c
2010-11-16 13:27:36 +08:00
Mike Lockwood
92c243afae am a28056b3: Set VM dirty ratio to zero when UMS is active
* commit 'a28056b38275003895ff5d9576681aca01544822':
  Set VM dirty ratio to zero when UMS is active
2010-10-29 08:16:15 -07:00
Mike Lockwood
a28056b382 Set VM dirty ratio to zero when UMS is active
Improves UI responsiveness when copying large amount of data to the device.

BUG: 3131847

Change-Id: I4aa5ade7e2cd7e5110c8f0f7ee43bdc57577e11d
Signed-off-by: Mike Lockwood <lockwood@google.com>
2010-10-28 15:21:24 -04:00
Kenny Root
456b7e6a99 am 918e5f9f: Better error code for unmounting not-mounted volumes
Merge commit '918e5f9f10b9c1ff929683743ffbf229027ce240' into gingerbread-plus-aosp

* commit '918e5f9f10b9c1ff929683743ffbf229027ce240':
  Better error code for unmounting not-mounted volumes
2010-09-30 18:05:58 -07:00
Kenny Root
918e5f9f10 Better error code for unmounting not-mounted volumes
ENOENT is more descriptive than the generic error that EINVAL gets
turned into. Then we can actually treat it how we want on the other
side.

Change-Id: I9b4f3be6308e13f680eae368d2167ab9ee6aae5f
2010-09-30 18:02:34 -07:00
Kenny Root
45f22ad121 am cbacf78e: Track type of container mounted
Merge commit 'cbacf78eff70bd43bb899e164ec2ab409bc0904c' into gingerbread-plus-aosp

* commit 'cbacf78eff70bd43bb899e164ec2ab409bc0904c':
  Track type of container mounted
2010-09-26 11:17:39 -07:00
Kenny Root
cbacf78eff Track type of container mounted
OBB and ASEC are tracked in the same active container list, but when it
comes time to unmount everything, it was trying to unmount the OBBs
according to ASEC rules. This led to the OBB not being unmounted and the
volume unmount failing.

Change-Id: I12c1d4d387b8022185d552b63edd61a50b9c0fc3
2010-09-26 07:35:17 -07:00
Mike Lockwood
9b46bebd2c am a4886f1f: More fixes for internal FAT partitions:
Merge commit 'a4886f1f8ed72e24a302a91a0ab18bc54b6f585e' into gingerbread-plus-aosp

* commit 'a4886f1f8ed72e24a302a91a0ab18bc54b6f585e':
  More fixes for internal FAT partitions:
2010-09-21 11:09:58 -07:00
Mike Lockwood
a4886f1f8e More fixes for internal FAT partitions:
Fix formatting partitions beyond the first partition.
Do not try to initialize the MBR when formatting only a single partition.

Change-Id: Ifbbd279b1c288b7b1b884a1a89248e3086ed735f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-21 13:59:31 -04:00
Brad Fitzpatrick
08cd8f76bf am 1b15d463: Add some missing closes on error conditions.
Merge commit '1b15d463d4816fc084767cbeda3ee69ff5527545' into gingerbread-plus-aosp

* commit '1b15d463d4816fc084767cbeda3ee69ff5527545':
  Add some missing closes on error conditions.
2010-09-20 11:45:40 -07:00
Brad Fitzpatrick
1b15d463d4 Add some missing closes on error conditions.
Also, some formatting fixes to get back into line with netd's copy of
logwrapper.c.

Change-Id: Id471b99e9c3c8c9bb0890ca0d5e1567125e35bd7
2010-09-20 11:11:46 -07:00
Mike Lockwood
3374b41f1f am 2dfe297e: Fixes for devices with internal FAT file system:
Merge commit '2dfe297ec47559dbe2297a72bea71cf515c03797' into gingerbread-plus-aosp

* commit '2dfe297ec47559dbe2297a72bea71cf515c03797':
  Fixes for devices with internal FAT file system:
2010-09-17 15:58:04 -07:00
Mike Lockwood
2dfe297ec4 Fixes for devices with internal FAT file system:
Only share a single partition via UMS if a specific partition
is specified in vold.fstab (rather than "auto")

Do not fail to reformat if MBR cannot be found.

Change-Id: I544ca2ee325c308af656ab9f4732c788a964c156
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-17 18:50:51 -04:00
Kenny Root
90d92f11ab am a3e06084: Allow execute on mounted ASEC and OBB containers
Merge commit 'a3e06084564c86ff618c40f185f3676b8b629b94' into gingerbread-plus-aosp

* commit 'a3e06084564c86ff618c40f185f3676b8b629b94':
  Allow execute on mounted ASEC and OBB containers
2010-09-02 13:25:27 -07:00
Kenny Root
a3e0608456 Allow execute on mounted ASEC and OBB containers
This allows us to place shared libraries in these containers which may
only be loaded if they are executable.

Change-Id: I78fa9ab6d5c58ec8b98c40004da72aebc0aade2a
2010-09-02 13:16:53 -07:00
Ethan
2c7d5761d2 am 75a3e1a9: VOLD - make volume daemon to handle state change from shared to no_media
Merge commit '75a3e1a95af0a2790de1b12aeca0008bfdc61649' into gingerbread-plus-aosp

* commit '75a3e1a95af0a2790de1b12aeca0008bfdc61649':
  VOLD - make volume daemon to handle state change from shared to no_media
2010-08-30 13:20:44 -07:00
Ethan
75a3e1a95a VOLD - make volume daemon to handle state change from shared to no_media
When volume state changed from shared to no_media,
    volume is not properly unshared.

Change-Id: I0117d67da95440d982275746a166ef6f4ac1c0e2
Signed-off-by: Ethan <ethan.too@gmail.com>
2010-08-30 09:07:59 -07:00
Jean-Baptiste Queru
582677b50c am 826bec79: Merge "vold: remove unnecessary code from VolumeManager::unshareVolume()"
Merge commit '826bec79ea253505813d125700a12816e2c3bc0f' into gingerbread-plus-aosp

* commit '826bec79ea253505813d125700a12816e2c3bc0f':
  vold: remove unnecessary code from VolumeManager::unshareVolume()
2010-07-29 11:31:13 -07:00
Jean-Baptiste Queru
826bec79ea Merge "vold: remove unnecessary code from VolumeManager::unshareVolume()" 2010-07-29 11:21:44 -07:00
Bruce Beare
8f295e9dee am d766090b: Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Merge commit 'd766090b7a72562be9e64700e13882663004650e' into gingerbread-plus-aosp

* commit 'd766090b7a72562be9e64700e13882663004650e':
  Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
2010-07-29 11:19:15 -07:00
Seth Forshee
b2b3d2cd34 vold: remove unnecessary code from VolumeManager::unshareVolume()
Signed-off-by: Seth Forshee <seth.forshee@garmin.com>
2010-07-23 03:31:57 -05:00
Bruce Beare
d766090b7a Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2010-07-22 13:30:11 -07:00
Kenny Root
e17e91f63b Fix loop_info/loop_info64 impedance mismatch
LOOP_GET_STATUS64 isn't useful here since the data contained within
isn't actually checked, so stick with the regular LOOP_GET_STATUS here
to match the struct loop_info we're using.

Change-Id: I4f9ff06fa44d4ae3aed046d423054554f9cf450b
2010-07-16 16:28:49 -07:00
Kenny Root
508c0e1605 Additional Obb functionality
* Rename all functions dealing with OBB files to mention Obb

* Add 'path' and 'list' functionality to OBB commands

* Store hashed filename in loop's lo_crypt_name and keep lo_file_name
  for the real source filename. That way we can recover it later with an
  ioctl call.

Change-Id: I29e468265988bfb931d981532d86d7be7b3adfc8
2010-07-15 12:41:01 -07:00
Kenny Root
fb7c4d5a8a Add image mounting commands for OBB files
Allow the mounting of OBB filesystem images if they're encrypted with
twofish and in FAT filesystem format.

Change-Id: I54804e598f46b1f3a784ffe517ebd9d7626de7aa
2010-07-07 08:14:32 -07:00
Mike Lockwood
99635f6c28 Use new kernel notifications to determine if USB mass storage is available.
The usb_mass_storage switch no longer exists in our 2.6.35 kernel.
Instead we will consider mass storage to be available if both USB is connected
and the USB mass storage function is enable.

Change-Id: I730d1b3cb3cac664fc2abcdc36cd39856a08404a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-28 08:57:00 -04:00
Kenny Root
acc9e7dcca Change ASCII conversion for hash and add tests
Hash was printed using snprintf(), but we can just write yet another hex
conversion utility!

Change-Id: I04f1992deaf5bf1b3e2751c8f07072f8ed6660e9
2010-06-20 22:03:10 -07:00
Nick Kralevich
f69b3b9af7 Get rid of warnings when compiled with -Wformat-security
Change-Id: I27e0819aba347e26051ad771c594b69700da1721
2010-05-14 10:37:37 -07:00
San Mehat
1a06edaf4d vold: Ensure we cleanup secure containers on card removal.
Fixes bug: http://b/issue?id=2567572

Note: The framework will still likely restart since the system_server
is holding references to assets on the card which are mmaped, but
at least now storage will be available when a new card is re-inserted.

Change-Id: I4e195c0c666426b93da47198fa826a6f58d855a9
Signed-off-by: San Mehat <san@google.com>
2010-04-15 12:59:15 -07:00
San Mehat
97ac40e4e6 vold: Switch from LOG -> SLOG
Change-Id: I48ee8bd90b47f5845f069cdf4d1b8ba6ecdb1b39
Signed-off-by: San Mehat <san@google.com>
2010-03-25 08:02:28 -07:00
Kenny Root
da62e7c002 Revert "Prevent null pointer deref in DirectVolume"
This reverts commit a9f423dd7e.
2010-03-24 20:18:00 -07:00
Kenny Root
a9f423dd7e Prevent null pointer deref in DirectVolume
There's a possibility that if something were messed up a call to
NetlinkEvent::findParam could return a NULL. Passing NULL as the
argument into atoi() would cause a null pointer dereference.

Change-Id: Ib071afbbe2adc341108c245ffa596cc8730bd8fd
2010-03-24 15:39:08 -07:00
San Mehat
88ac2c0653 vold: asec path cmd now returns OpFailedStorageNotFound if id doesn't exist
Change-Id: Icbe3de7c28505f7496c8f8edea126c7b616de475
Signed-off-by: San Mehat <san@google.com>
2010-03-23 11:15:58 -07:00
San Mehat
96597e8b84 vold: Add mounted filesystems to dump cmd
Change-Id: If025e7ee10a79ff089920a6d0c1a52358b2d2c22
Signed-off-by: San Mehat <san@google.com>
2010-03-17 09:50:54 -07:00
Kenny Root
7b18a7b36f vold: Convert to use OpenSSL MD5 API
Change-Id: I9b84370fa9a98464c211ebe8983be8dbe9dd7ccd
2010-03-15 14:39:40 -07:00
San Mehat
befd59c152 vold: remove some dead code
Change-Id: Iaeb5d3334ec22ed31da9734bb8d7cd17e6a40eaf
Signed-off-by: San Mehat <san@google.com>
2010-03-15 10:28:21 -07:00
San Mehat
cb4dac8a52 vold: Remove autorun.inf at mount/unmount time if it exists
Change-Id: Ia57da8ee177453a601a23d965c2b4f16b6de46e5
Signed-off-by: San Mehat <san@google.com>
2010-03-14 13:41:54 -07:00
San Mehat
57df7bf339 vold: Fix argument validation for volume commands
Change-Id: I74aa63ff9f9bc32bd871e6c53ab50b6baf79e650
Signed-off-by: San Mehat <san@google.com>
2010-03-14 13:41:27 -07:00
San Mehat
d9a4e35861 vold: Bugfixes & cleanups
- Fix issue where container-names > 64 bytes were getting truncated in the
    kernel. lo_name is only 64 bytes in length, so we now hash the container
    id via md5
  - Add 'dump' command to dump loop and devicemapper status
  - Add 'debug' command to enable more detailed logging at runtime
  - Log vold IPC arguments (minus encryption keys)
  - Fix premature return from Loop::lookupActive() and friends

Change-Id: I0e833261a445ce9dc1a8187e5501d27daba1ca76
Signed-off-by: San Mehat <san@google.com>
2010-03-13 16:42:19 -08:00
San Mehat
2a5b8ce09b vold: Switch to using libdiskconfig for partition setup.
Also handles an issue where NPARTS=0 on a disk change uevent

Change-Id: I77c56f177dc65df91468bbd7d5fe1889db414d7a
Signed-off-by: San Mehat <san@google.com>
2010-03-10 15:18:41 -08:00
Jean-Baptiste Queru
d071596fd9 Add an empty CleanSpec.mk
Change-Id: Ied5f7eddd18adb38699c8a034a78ff9de4aab8de
2010-03-08 18:05:25 -08:00