Lines Matching refs:top
541 static int top_works(const char *top)
543 if (top != NULL && adb_is_absolute_host_path(top)) {
546 "%s" OS_PATH_SEPARATOR_STR SENTINEL_FILE, top);
571 char *top = getenv("ANDROID_BUILD_TOP");
572 if (top != NULL && top[0] != '\0') {
573 if (!top_works(top)) {
574 fprintf(stderr, "adb: bad ANDROID_BUILD_TOP value \"%s\"\n", top);
578 top = getenv("TOP");
579 if (top != NULL && top[0] != '\0') {
580 if (!top_works(top)) {
581 fprintf(stderr, "adb: bad TOP value \"%s\"\n", top);
585 top = NULL;
589 if (top != NULL) {
590 /* The environment pointed to a top directory that works.
592 strcpy(path_buf, top);
597 * to see if we can find the top.
600 top = find_top_from(getcwd(dir, sizeof(dir)), path_buf);
601 if (top == NULL) {
602 /* If the CWD isn't under a good-looking top, see if the
606 top = find_top_from(dir, path_buf);
608 return top;
661 const char *top = find_top(top_buf);
662 if (top == NULL) {
663 fprintf(stderr, "adb: Couldn't find top of build tree\n");
781 top:
950 goto top;