Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: pkg/flash_sd_card/lib/src/platform_service.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/flash_sd_card/lib/src/context.dart ('k') | pkg/fletch/lib/_sdkext » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dartino 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';
(...skipping 28 matching lines...) Expand all
39 /// and insert the SD card and through diffing the content of '/dev' the 39 /// and insert the SD card and through diffing the content of '/dev' the
40 /// device name for the card is determined. 40 /// device name for the card is determined.
41 Future<String> findSDCard() async { 41 Future<String> findSDCard() async {
42 await ctx.readLine( 42 await ctx.readLine(
43 'Please remove all SD cards from this computer. Then press Enter.'); 43 'Please remove all SD cards from this computer. Then press Enter.');
44 Set defaultDisks = new Set.from(await listPossibleSDCards()); 44 Set defaultDisks = new Set.from(await listPossibleSDCards());
45 ctx.log('Default disks $defaultDisks'); 45 ctx.log('Default disks $defaultDisks');
46 46
47 // Wait for an additional disk. 47 // Wait for an additional disk.
48 await ctx.readLine( 48 await ctx.readLine(
49 'Please insert the SD card you want to use with Fletch. ' 49 'Please insert the SD card you want to use with Dartino. '
50 'Then press Enter.'); 50 'Then press Enter.');
51 int retryCount = 10; 51 int retryCount = 10;
52 while (true) { 52 while (true) {
53 Set disks = new Set.from(await listPossibleSDCards()); 53 Set disks = new Set.from(await listPossibleSDCards());
54 ctx.log('Disks $disks'); 54 ctx.log('Disks $disks');
55 Set diff = disks.difference(defaultDisks); 55 Set diff = disks.difference(defaultDisks);
56 if (diff.length == 1) { 56 if (diff.length == 1) {
57 return diff.first; 57 return diff.first;
58 } 58 }
59 59
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « pkg/flash_sd_card/lib/src/context.dart ('k') | pkg/fletch/lib/_sdkext » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698