OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:convert'; | 6 import 'dart:convert'; |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:power_management/power_management.dart' as power_management; | 9 import 'package:power_management/power_management.dart' as power_management; |
10 import 'package:sdk_services/sdk_services.dart'; | 10 import 'package:sdk_services/sdk_services.dart'; |
11 import 'context.dart'; | 11 import 'context.dart'; |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 var mountDir = await (await ctx.tmpDir).createTemp(); | 360 var mountDir = await (await ctx.tmpDir).createTemp(); |
361 // Explicitly mount the first partition which is the boot partition. | 361 // Explicitly mount the first partition which is the boot partition. |
362 var partition = device.startsWith('mmcblk') ? '${device}p1' : '${device}1'; | 362 var partition = device.startsWith('mmcblk') ? '${device}p1' : '${device}1'; |
363 var result = await ctx.runProcess('mount', [partition, mountDir.path]); | 363 var result = await ctx.runProcess('mount', [partition, mountDir.path]); |
364 if (result.exitCode != 0) { | 364 if (result.exitCode != 0) { |
365 await ctx.failure('Failed to mount $device', result.stderr); | 365 await ctx.failure('Failed to mount $device', result.stderr); |
366 } | 366 } |
367 return mountDir; | 367 return mountDir; |
368 } | 368 } |
369 } | 369 } |
OLD | NEW |